Top "Replace" questions

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

Is it possible to use find and replace on a wildcard string in VIM?

For example, I have a bunch of values with a common prefix and postfix, such as: fooVal1Bar; fooVal2Bar; …

vim wildcard replace
Remove backslash \ from string using preg replace of php

I want to remove the backslash alone using php preg replace. For example: I have a string looks like $var = "…

php regex replace preg-replace stripslashes
Find and Replace with Regex in Microsoft Word 2013

I am editing an e-book document with a lot of unnecessary markup. I have a number of sections in the …

regex string replace ms-word
Position of a character in a NSString or NSMutableString

I have searched for hours now and haven't found a solution for my problem. I have a NSString which looks …

objective-c nsstring replace nsmutablestring
Replace single backslash with double backslash

It seems simple enough, right? Well, I don't know. Here's the code I'm trying: input = Regex.Replace(input, "\\", "\\\\\\"); However, I'm …

c# regex string replace backslash
Speed up millions of regex replacements in Python 3

I'm using Python 3.5.2 I have two lists a list of about 750,000 "sentences" (long strings) a list of about 20,000 "words" that …

python regex string performance replace
Replace/Remove characters that do not match the Regular Expression (.NET)

I have a regular expression to validate a string. But now I want to remove all the characters that do …

c# regex replace remove-if
Oracle - Update string to replace only the last character

I have the following string in an Oracle 9i database: A,B,C, I need to replace all instances of …

replace sql-update oracle9i substr
Capitalize first letter of each word in a selection using vim

In vim, I know we can use ~ to capitalize a single char (as mentioned in this question), but is there …

regex vim replace find capitalize
preg_replace how to replace only matching xxx($1)yyy pattern inside the selector

I'm trying to use a regular expression to erase only the matching part of an string. I'm using the preg_…

php regex replace preg-match regex-group