Tutorial by Examples

One of the most common and useful ways to replace text with regex is by using Capture Groups. Or even a Named Capture Group, as a reference to store, or replace the data. There are two terms pretty look alike in regex's docs, so it may be important to never mix-up Substitutions (i.e. $1) with Back...
Some programming languages have its own Regex peculiarities, for example, the $+ term (in C#, Perl, VB etc.) which replaces the matched text to the last group captured. Example: using System; using System.Text.RegularExpressions; public class Example { public static void Main() { ...

Page 1 of 1