The following two examples below show how to use these flags with match . Examples Example 1. In the following example, match is used to find 'Chapter' followed by one or more numeric characters followed by a decimal point and numeric character zero or more times. The following example demonstrates the use of the global and ignore case flags with match . Used to find a match between a regular expression and a string, and to replace the matched substring with a new substring.
Parameters string is any string.
It can be a variable name or a literal. These can be included separately or together. The following two examples below show how to use these flags with replace . Examples Example 1. In the following example, the regular expression is defined in replace and includes the ignore case flag.