'Regular expressions' is the term used for a codified method of searching invented or defined by the American mathematician Stephen Kleene. If you are not familiar with 'Regular Expression' just type 'Tutorial Regular Expressions' in your favorite search engine. WARNING! The following characters '+*?)(][^$}{|.' have special meaning in 'Regular expressions'. If you intent to use them without signification, you have to escape these characters by preceding them with '\'.
▪ '^' Only matches the beginning of a string. Eg.: '^The' matches 'The' in 'The night' by not 'In The Night'.
▪ '$' Only matches the end of a string. Eg.: 'and$' matches 'and' in 'Land' but not 'landing'.
▪ '[xyz]' Match any one character enclosed in the character set. You may use a hyphen to denote range. Eg.: '[a-z]' matches any letter in the alphabet, '[0-9]' any single digit. '[AN]BC' matches 'ABC' and 'NBC' but not 'BBC' since the leading 'B' is not in the set.
▪ '[^xyz]' Match any one character not enclosed in the character set. The caret indicates that none of the characters. Eg.: '[^AN]BC' matches 'BBC' but not 'ABC' or 'NBC'.
▪ '.' (Dot) Match any character except newline or another Unicode line terminator. Eg.: 'b.t' matches 'bat', 'bit', 'bet' and so on.
▪ 'x' Match exactly x occurrences of a regular expression. Eg.:'[0-9]5' matches 5 digits.
▪ 'x,' Match x or more occurrences of a regular expression.
▪ 'x,y' Match x to y number of occurrences of a regular expression.
▪ '?' Match 0 or one occurrence of a regular expression. Same as 0,1.
▪ '*' Match 0 or more occurrences of a regular expression. Same as 0,.
▪ '+' Match 1 or more occurrences of a regular expression. Same as 1,.
▪ '( )' Grouping characters together to create a clause. May be nested. Eg.: '(abc)+(def)' matches one or more occurrences of 'abc' followed by one occurrence of 'def'.
▪ '|' Alternation combines clauses into one regular expression and then matches any of the individual clauses. Similar to 'OR' statement. Eg.: '(ab|cd|ef)' matches 'ab' or 'cd' or 'ef'.