Top "Replace" questions

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

How to replace multiple substrings of a string?

I would like to use the .replace function to replace multiple strings. I currently have string.replace("condition1", "") but would …

python text replace
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 …

python string replace
How to replace specific values in a oracle database column?

I am looking to replace values in a particular column. For example the following column values column name ---------- Test1 …

sql oracle replace
Strip Leading and Trailing Spaces From Java String

Is there a convenience method to strip any leading or trailing spaces from a Java String? Something like: String myString = " …

java string replace
Removing a list of characters in string

I want to remove characters in a string in python: string.replace(',', '').replace("!", '').replace(":", '').replace(";", …

python string list replace
How can I use mySQL replace() to replace strings in multiple records?

We have a database that has a bunch of records with some bad data in one column, in which an …

mysql replace
Replace all elements of Python NumPy Array that are greater than some value

I have a 2D NumPy array and would like to replace all values in it greater than or equal to …

python arrays numpy replace conditional-statements
How to grep and replace

I need to recursively search for a specified string within all files and subdirectories within a directory and replace this …

linux grep replace
Java how to replace 2 or more spaces with single space in string and delete leading and trailing spaces

Looking for quick, simple way in Java to change this string " hello there " to something that looks like this "hello …

java regex string replace
How to input a regex in string.replace?

I need some help on declaring a regex. My inputs are like the following: this is a paragraph with<[1&…

python regex string replace