replace

Change text msg after 5 star vote (maybe animated)

Hi, Im seeking help to do a "text roll/replace" and even better if animated. To the point i have a vote with 5 stars, once people have clicked on the rating, star 1, 2, 3.. etc At first i want to show msg: "Like it or not?" once voted text change to, "thumbs up pal!" and seconds after changing to "2 rating from 1 vote" Hope it makes...

Java Regex to remove start/end single quotes but leave inside quotes

I have data from a CSV file that is enclosed in single quotes, like: 'Company name' 'Price: $43.50' 'New York, New York' I want to be able to replace the single quotes at the start/end of the value but leave quotes in the data, like: 'Joe's Diner' should become Joe's Diner I can do updateString = theString.replace("^'", "").repl...

How to do perl inline regex without setting to a variable?

Normally if you wish to change a variable with regex you do this: $string =~ s/matchCase/changeCase/; But is there a way to simply do the replace inline without setting it back to the variable? I wish to use it in something like this: my $name="jason"; print "Your name without spaces is: " $name => (/\s+/''/g); Something like tha...

How can I change font size specified in an HTML document using Perl?

I am modifying some HTML pages and want to increase the font size dynamically with a regex. In my script below, I want the '8' and '3' to turn into '9' and '4' but I get '8++' and '3++', respectively. I have the following: #!/usr/bin/perl use warnings; use LWP::Simple; my $content = "<TD><FONT STYLE=\"font-family:Verdana, Geneva, sans-...

Regular expression to add base domain to directory

10 websites need to be cached. When caching: photos, css, js, etc are not displayed properly because the base domain isn't attached to the directory. I need a regex to add the base domain to the directory. examples below base domain: http://www.example.com the problem occurs when reading cached pages with img src="thumb/123.jpg" or src...

Change two or more spaces to a single semicolon

Hi! I am struggling with formatting of a db2 query. I would like to replace 2 or more spaces in a string with a semicolon. I know how to do it with all spaces, the question would be how to change only 2 or more spaces :P Here is an example, i would like to change this: john doe 1900-01-01 california to john doe;1900-01-01;cal...

c# regex replace

Hi, I have a database containing Page ojects with html content. A lot of the rows in the db contain this content <p style="float: left; margin-right: 20px; height: 300px;"> <img src="...">More html ... </p> So I created a super simple regex replace: foreach (var page in db.Pages) { str...

Ant propertyfile replacing value issue

Hello, I'm trying to change values in my application.properties file and I'm running into issues with an extra "\" character when trying to substitute url addresses. It doesn't happen when I'm replacing regular text. Here's the section of the properties file I'm attempting to modify: # Web Info web.url=http://www.testaddress.com web.u...

Using C#, how to search and enter a hyperlink in a block of text?

For some reason I can't find this through searches, not really sure what keywords to use. In my web app, users enter text into plain text boxes. I want to automatically convert any http://somekind.oflink.com to an html anchor tag for them. What's the best way to capture the link? I only want to support links that start with "http://". ...

recongnize and replace links in yahoo pipes with regex

would there be a formula to recognize any link out of rss feeds and replace them with a fix value with regex in yahoo pipes? ...

jQuery multiple character replace

I have a very easy question. Unfortunately, I can't find the answer. I just made 2 simple input functions Input 1:<br /><input type="text" id="i1" name="i1" /> Input 2:<br /> <input type="text" id="i2" name="i2" /> When changing input 1, I want to let appear the result in input 2. Also I want some characters being replaced and I want ...

automated find/replace soltion for scripts (php)

I need a function/class/or some kind of sophisticated find/ replace solution for this problem Have a huge form with lot of: 1: input tags like this one <input id="Id" name="Id" class="element text large" value="" type="text" /> which needs to be "changed/replaced" to this one <div class="element text large" id="username"><?php ec...

Find text(A) and replace it with text(B) + HTML

Hello guys, I'd like to find with jquery some specific text, and replace it with a renewed version including some HTML. I've tried this, which is working when I use only text: <script type="text/javascript" > jQuery(document).ready(function(){ jQuery("*").contents().each(function() { if(this.nodeType == 3) this.nodeVa...

Javascript :: Div Editable and More... More...

Well, I need to replace a word, in a div contentEdible property on, by the same word but formatted... Like this: <div> My balls are big </div> To this (replace the word: balls): <div> My <font style="color:blue;">balls</font> are big </div> In a contentEditable this happens dinamically, while the user type the text the replacements hap...

CSharp to replace strings of text in a docx

Using C#, is there a good way to find and replace a text string in a docx file without having word installed on that machine? ...

replace url with other url using jquery

Hi, how can I replace all url's in a page with different URL using jquery ? thanks :) ...

Perl: Global substitution within tag-delimited string

My goal is to replace all instances of a trailing - to a trailing + within tag brackets. Lets assume the line to be replaced looks like this: <h> aa- aa- </h> <h> ba- ba- </h> and should afterwards look like <h> aa+ aa+ </h> <h> ba+ ba+ </h> First I tried this expression: s/<h>(.*?)-(.*?)<\/h>/<h>$1+$2<\/h>/g; which yielded th...

Perl: Global substition within tag delimited string

My previous post got the tags partially stripped, so here it is again: My goal is to replace all instances of a trailing - to a trailing + within tag brackets. Lets assume the line to be replaced looks like this: <h> aa- aa- </h> <h> ba- ba- </h> and should afterwards look like <h> aa+ aa+ </h> <h> ba+ ba+ </h>. First I tried th...

access vba replace vblf's with vbcrlf's

Lets say for example my table name is "thistablelf" and the column where I want to replace all the vblf occurances is called "vblftovbcrlf". How do I replace all occurances of vblf's to vbcrlf's? ...

mySql query search and replace

Hey folks, I have a field within a table that I need to do a search and replace on, though it's a bit tricky and beyond my measure of querying skills. Basically, the contents of a field may look like this: image1.jpg image2.jpg image3.jpg image4.jpg image5.jpg I need to do a search and replace that would replace each line with somethi...