Top "Replace" questions

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

Replace dash character in Java String

I tried to replace "-" character in a Java String but is doesn't work : str.replace("\u2014", ""); Could you help …

java string replace str-replace
How to work with unicode in Python

I am trying to clean all of the HTML out of a string so the final output is a text …

python string unicode replace unicode-string
Find & Replace digit by digit and space in Sublime Text

I have lot of digits and I want to add spaces in between them, like so: 0123456789 --> 0 1 2 3 4 5 6 7 8 9 I'm trying …

regex replace find sublimetext3 digit
sed: replace ip in hosts file, using hostname as pattern

I'm learning about sed but it is very difficult to me understand it. I have adsl with dynamic ip so …

bash replace sed ip hosts
How to do search & replace with ack in vim?

I am using the Ack plugin in Vim, which helps me to quickly search for strings in my project. However, …

search vim replace ack
Path with backslashes to path with forward slashes javascript

I'm trying to make a local xml file parsing "application" for some colleagues and i'm using the current function to …

javascript replace backslash
How to remove newLines at the beginning and at the end of a Ruby string

I need to remove newlines at the beginning and at the end of a string in ruby (some sort of …

ruby string replace trim
php validation issue End of line character is invalid; expected "\n" but found "\r\n"

I am using Sublime text editor. I want to validate a Prestashop module in the validator. But it showing the …

php replace sublimetext3 prestashop
Regex for replacing <p class="someClass"> with <h2> tag?

I need to replace all: <p class="someClass someOtherClass">content</p> with <h2 class="someClass …

php regex replace paragraph html-heading
Replace a value NA with the value from another column in R

I want to replace the NA value in dfABy from the column A, with the value from the column B, …

r replace na