Regular expressions are patterns of text that can be used by a regular expression parser to search a string for text that matches the pattern, and if required, replace the matched items with other text.
Using regular expressions
Defining regular expressions
A regular expression (regex) is made up of characters that define a pattern. The expression contains special symbols that are meaningful to the parser, and if you want to use those symbols in the search pattern in the expression then you can escape them with a backslash (\). Your code will typically pass the expression as a string object to an instance of the regex class as a constructor parameter. This object is then passed to functions in <regex> that will use the...