Tool to find and replace by regular expression (regexp/regex) in text, message, or document to perform the corresponding replacements.
Regular Expression Replacement - dCode
Tag(s) : Data Processing
dCode is free and its tools are a valuable help in games, maths, geocaching, puzzles and problems to solve every day!
A suggestion ? a feedback ? a bug ? an idea ? Write to dCode!
It is a search and replace operation, but using a search by regular expression (or rational expression or regexp) that makes it possible to extract subsets of strings respecting a precise description. Regular expression replacements allow the ability of this search to be coupled with replacement capabilities based on the results of the search.
Example: ([a-z])[a-z] describes a set of any 2 consecutive letters. Replacing with $1 makes it possible to retain only the first letter.
Parentheses are used to number and reference their contents. Each captured parenthesis encountered will thus be associated with a back reference.
A back reference is therefore a reference to a capturing submask defined previously (in parentheses).
The reference is noted with a backslash or with a dollar followed by a number greater than 0 and often limited to 9 or 99).
Example: The regex ((A)BC) will capture ABC in \1 and A in \2.
dCode retains ownership of the "Regular Expression Replacement" source code. Except explicit open source licence (indicated Creative Commons / free), the "Regular Expression Replacement" algorithm, the applet or snippet (converter, solver, encryption / decryption, encoding / decoding, ciphering / deciphering, breaker, translator), or the "Regular Expression Replacement" functions (calculate, convert, solve, decrypt / encrypt, decipher / cipher, decode / encode, translate) written in any informatic language (Python, Java, PHP, C#, Javascript, Matlab, etc.) and all data download, script, or API access for "Regular Expression Replacement" are not public, same for offline use on PC, mobile, tablet, iPhone or Android app!
Reminder : dCode is free to use.
The copy-paste of the page "Regular Expression Replacement" or any of its results, is allowed (even for commercial purposes) as long as you credit dCode!
Exporting results as a .csv or .txt file is free by clicking on the export icon
Cite as source (bibliography):
Regular Expression Replacement on dCode.fr [online website], retrieved on 2024-11-21,