tagged [replace]
How can I add a string to the end of each line in Vim?
How can I add a string to the end of each line in Vim? I want to add `*` to the end of each line in Vim. I tried the code unsuccessfully
Fastest method to replace all instances of a character in a string
Fastest method to replace all instances of a character in a string What is the fastest way to replace all instances of a string/character in a string in JavaScript? A `while`, a `for`-loop, a regular ...
- Modified
- 5 Sep at 16:43
Best way to replace multiple characters in a string?
Best way to replace multiple characters in a string? I need to replace some characters as follows: `&` ➔ `\&`, `#` ➔ `\#`, ... I coded as follows, but I guess there should be some better way. Any hint...
c# replace \" characters
c# replace \" characters I am sent an XML string that I'm trying to parse via an XmlReader and I'm trying to strip out the `\"` characters. I've tried plus several other ways. Any ideas?
- Modified
- 25 Dec at 14:45
C# hexadecimal value 0x12, is an invalid character
C# hexadecimal value 0x12, is an invalid character I am loading a lot of xml documents and some of them return errors like "hexadecimal value 0x12, is an invalid character" and there are different cha...
- Modified
- 10 Jan at 19:46
Lua String replace
Lua String replace How would i do this? I got this: which should return "Hi", but it grabs the caret character as a pattern character What would be a work around for this? (must be done in gsub)
- Modified
- 18 Sep at 14:49
Remove a fixed prefix/suffix from a string in Bash
Remove a fixed prefix/suffix from a string in Bash I want to remove the prefix/suffix from a string. For example, given: How do I get the following result?
- Modified
- 8 Feb at 05:47
C# Trim() vs replace()
C# Trim() vs replace() In a C# `string` if we want to replace `" "` in a string to `string.empty`, is it fine to use `stringValue.Trim()` or `stringValue.replace(" ", string.empty)`. Both serve the sa...
How can I do a recursive find/replace of a string with awk or sed?
How can I do a recursive find/replace of a string with awk or sed? How do I find and replace every occurrence of: with in every text file under the `/home/www/` directory tree recursively?