Top "Replace" questions

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

string replace in a large file with php

I am trying to do a string replace for entire file in PHP. My file is over 100MB so I …

php string replace readfile
Put dash between every third character

I had a problem on how to put dash in every 3rd character. For example, I want ABCDEF turn into …

php string replace substr
Replace element contents with document fragment javascript

I'm trying to replace all contents of an element with a document fragment: var frag = document.createDocumentFragment() The document fragment …

javascript replace documentfragment
Java remove all non alphanumeric character from beginning and end of string

I know how to replace ALL non alphanumeric chars in a string but how to do it from just beginning …

java regex string replace alphanumeric
Convert Lua data to JSON

This EPGP World of Warcraft addon outputs an epgp.lua database file. I wrote a plugin to convert the Lua …

javascript replace lua world-of-warcraft
How to replace a directory in a SVN repository without breaking anything

I need to replace a directory in my SVN repository on the production server, but am not sure of the …

svn replace directory repository working-copy
Replace specific capture group instead of entire regex in Perl

I've got a regular expression with capture groups that matches what I want in a broader context. I then take …

regex perl replace capture-group
Replacing a specific Unicode Character in MS SQL Server

I'm using MS SQL Server Express 2012. I'm having trouble removing the unicode character U+02CC (Decimal : 716) in the grid results. …

sql-server replace unicode-string
In SQL Server, replace a Char(0), the null character, embedded in a string with its hex code

What is a construct in SQL Server T-SQL that will replace a Char(0), the null character, embedded in a string …

sql-server replace hex nul
How can I replace two strings in a way that one does not end up replacing the other?

Let's say that I have the following code: String word1 = "bar"; String word2 = "foo"; String story = "Once upon a time, …

java string replace