Top "Replace" questions

Replacing is the action of searching a string for a sub-string and replacing it with a different string.

Java replace issues with ' (apostrophe/single quote) and \ (backslash) together

I seem to be having issues. I have a query string that has values that can contain single quotes. This …

java string replace escaping backslash
String replace a Backslash

How can I do a string replace of a back slash. Input Source String: sSource = "http://www.example.com\/value"; …

java string replace replaceall
Replace last occurrence of a string in a string

Anyone know of a very fast way to replace the last occurrence of a string with another string in a …

php string replace last-occurrence
python replace single backslash with double backslash

In python, I am trying to replace a single backslash ("\") with a double backslash("\"). I have the following code: directory = …

python string replace backslash
Eclipse, regular expression search and replace

In eclipse, is it possible to use the matched search string as part of the replace string when performing a …

regex eclipse replace
Why doesn't calling a Python string method do anything unless you assign its output?

I try to do a simple string replacement, but I don't know why it doesn't seem to work: X = "hello …

python string replace
How to replace a character with a newline in Emacs?

I am trying to replace a character - say ; - with a new line using replace-string and/or replace-regexp in …

emacs replace
How can I replace newline characters using JSP and JSTL?

I have a list of bean objects passed into my JSP page, and one of them is a comment field. …

string jsp replace jstl newline
Java Replacing multiple different substring in a string at once (or in the most efficient way)

I need to replace many different sub-string in a string in the most efficient way. is there another way other …

java string replace
Javascript and backslashes replace

here is my string: var str = "This is my \string"; This is my code: var replaced = str.replace("/\\/", "\\\\"); I can't …

javascript replace backslash