Could anyone explain what's being replaced here?
I don't know if enough information is present to understand what's being searched and what's being replaced:
regEx.Pattern = "(\s) *(\S)"
regEx.Global = True
that = regEx.Replace(that, "$1$2")
...
I have two development trees v3.3, and v3.4 in one SVN repository. They both contain a project called test-harness. However, the v3.4 developers have wrecked the test-harness so we need the test-harness from project in v3.3 to overwrite what we have in v3.4. I want to retain the history of change made to 3.4 test-harness as it has some i...
var src = "http://blah.com/SOMETHING.jpg";
src.replace(/.*([A-Z])\.jpg$/g, "X");
at this point, shouldn't src be:
http://blah.com/SOMETHINX.jpg
If I use match() with the same regular expression, it says it matched. Regex Coach also shows a match on the character "G".
...
I have loaded a memorystream with a word document and I want to be able to alter specific text within the memorystream and save it back to the word document, like search and replace functionality. Please can anyone help me with this as I don't want to use the Word Interop libraries. I have the code to load and save the document already...
Using jQuery, I'd like to remove the whitespace and line breaks between HTML tags.
var widgetHTML = ' <div id="widget"> <h2>Widget</h2><p>Hi.</p> </div>';
Should be:
alert(widgetHTML); // <div id="widget"><h2>Widget</h2><p>Hi.</p></div>
I think the pattern I will need is:
>[\s]*<
Can this be accomplished without...
Hello Stack Overflow Community,
I have a list where I want to replace values with None where condition() returns True.
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
For example, if condition checks bool(item%2) should return:
[None, 1, None, 3, None, 5, None, 7, None, 9, None]
What is the most efficient way to do this?
...
Hi In Reference to this question After getting the line identifier matching in first and second file I need to replace the line in first file with the line of second file.For that I am using SED as below. But Sed only replaces that line in a new file. How can I achieve the updation in same file without temporary file.(Because those are v...
Hi!
I'm looking for a way to script replacing strings in PDF documents. I can use either perl, ruby or php. If possible, regex would be a blast...
Thank you!
...
I have read about REPLACE and INSERT ON DUPLICATE key queries, and while I can see how useful they are, they don't appear to work for my purposes. Perhaps my database design is off from how it should be, but either way I hope I can get this working.
I am trying to mock up an online store to teach myself mysql and php, and I am recording...
I hope someone can help,
I have made a script that masks images... however it is reliant on a colour to mask with ( 'green screen' style). The trouble is if the image that I am masking contains that colour it is ruined.
What I am looking to do is prior to masking the image replace any occurance of my keying colour (0,0,255) with a simi...
Hi,
I have to replace in a following manner
if the string is "string _countryCode" i have to replace it as "string _sCountryCode"
as you can see where there is _ I replace it with _s followd be next character in capitals ie _sC
more examples:
string _postalCode to be replaced as string _sPostalCode
string _firstName to be replace a...
i got help (http://stackoverflow.com/questions/1553601/jquery-select-a-tag-with-selector-from-a-text-veriable) on looping the static var and replacing it value, but just one question is left from it, is how can i replace finded tags with newly changed tags in the text area
Code:
var length = 30;
var end = '...';
var text = `some st...
i am trying to remove href attr from all the anchor tags using Reg Ex,for print page.
Although i need the text value in anchors.
...
I'm using this (jQuery) to replace all <br>s with <br /> to clear out validation errors:
$("<br>").replaceAll("<br />");
but it doesn't reduce any validation errors. Does validator check the original source?
...
Hello all,
I have next mission: i have to replace flash alement with javascript in this page: http://www.fplus.si/
(changing the images with buttons for every image)
Afcourse it has to look and work excactly the same. I found some jquery modules that do almost like this, but there are not the same. did somebody stumbled upon such modul...
Hello All
I have a huge problem with the REPLACE SQL function in Microsoft SQL Server Management Studio Express.
When I do following query
SELECT REPLACE('ArticleNumber', 'S401', 'I0010')
SELECT REPLACE('ArticleNumber', 'S302', 'I0020')
SELECT REPLACE('ArticleNumber', 'S303', 'I0030')
SELECT REPLACE('ArticleNumber'...
For some reason I'm struggling with this.
I have the following 2 arrays and I need to take the array values from the $img array and insert them in order into the $text array, appending/replacing the %img_ tags, like so:
$text = array(
0 => "Bunch of text %img_ %img_: Some more text blabla %img_",
1 => "More text %img_ blabla %i...
How to I find and replace every occurrence of:
subdomainA.example.com
with
subdomainB.example.com
in every text file under the /home/www/ directory tree (recursive find/replace).
...
Not sure if the subject was clear, hard to describe, easy to show:
I need to convert this:
$text = 'Bunch of text %img_Green %img_Red and some more text here';
to this:
$text = 'Bunch of text <img src="/assets/images/Green.gif" alt="Green" /> <img src="/assets/images/Red.gif" alt="Red" /> and some more text here';
Thanks in advan...
I have a string like this "HelloWorldMyNameIsCarl" and I want it to become something like "Hello_World_My_Name_Is_Carl". How can I do this?
...