Top "Replace" questions

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

How to remove all characters after a specific character in python?

I have a string. How do I remove all text after a certain character? (In this case ...) The text after …

python replace python-2.6
Replacing few values in a pandas dataframe column with another value

I have a pandas dataframe df as illustrated below: BrandName Specialty A H B I ABC J D K AB …

python replace pandas dataframe
What function is to replace a substring from a string in C?

Given a (char *) string, I want to find all occurrences of a substring and replace them with an alternate string. …

c string replace
Replace and overwrite instead of appending

I have the following code: import re #open the xml file for reading: file = open('path/test.xml','r+') #…

python replace
jQuery removing '-' character from string

I have a string "-123445". Is it possible to remove the '-' character from the string? I have tried the …

jquery string replace
Find and replace with sed in directory and sub directories

I run this command to find and replace all occurrences of 'apple' with 'orange' in all files in root of …

linux command-line sed replace
Replace multiple strings with multiple other strings

I'm trying to replace multiple words in a string with multiple other words. The string is "I have a cat, …

javascript node.js regex string replace
How to replace part of string by position?

I have this string: ABCDEFGHIJ I need to replace from position 4 to position 5 with the string ZX It will look …

c# string replace
Replace one character with another in Bash

I need to be able to do is replace a space () with a dot (.) in a string in bash. I …

string bash replace
jQuery if div contains this text, replace that part of the text

Like the title says, I want to replace a specific part of the text in a div. The structure looks …

jquery text replace contains