Tag Archives: regex matching

7.1.4. Matching regular expressions (regexes)

Just like with string matching, regex matching applies to verbatim strings as they are passed, with the exception of the backslash (“\”) which makes it possible to escape some characters such as the space.

If the “-i” flag is passed before the first regex, then the matching will be performed ignoring the case. In order to match the string “-i”, either set it second, or pass the “–” flag before the first string.

Same principle applies of course to match the string “–“.

Share Button