Top "Replace" questions

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

Remove a part of a string, but only when it is at the end of the string

I need to remove a substring of a string, but only when it is at the END of the string. …

php string replace preg-replace
jQuery - Replace all parentheses in a string

I tried this: mystring= mystring.replace(/"/g, "").replace(/'/g, "").replace("(", "").replace(")", ""); It works for all double and single quotes …

javascript replace special-characters
How to strip a tag and all of its inner html using the tag's id?

I have the following html: <html> <body> bla bla bla bla <div id="myDiv"> …

php html replace tags domparser
find & replace commas with newline on Google Spreadsheet

I've been trying to figure out how to replace commas with line-breaks. I've tried using (/r/n/), char(10), the Unicode …

regex replace google-sheets
How to replace tabs with spaces in Atom?

As I started working with Atom text editor, I used tab-indentation but want to change to 4-space-indentation. I have several …

replace indentation atom-editor
String.Replace() vs. StringBuilder.Replace()

I have a string in which I need to replace markers with values from a dictionary. It has to be …

c# .net .net-4.0 replace
PHP string replace match whole word

I would like to replace just complete words using php Example : If I have $text = "Hello hellol hello, Helloz"; and …

php string replace str-replace
Replace string in an array with PHP

How can I replace a sub string with some other string for all items of an array in PHP? I …

php arrays str-replace replace
Multiline Find & Replace in Visual Studio

Can it be done? We're using VS2005 and VS2008 and VS2010. I don't mean regular expressions - which have their …

visual-studio ide replace multiline
MySQL query to replace spaces in a column with underscores

I have a MySQL database table 'photos' with a column 'filename'. I need to replace the spaces in the filename …

mysql replace space