« Notable Links | Main | Notable Links »

Easily misunderstood options in RegEx

Posted by: David Carroll

OptionDescription
MultilineHas nothing to do with how many lines are in the input string. Rather, this simply modifies the behavior of ^ and $ so that they match BOL and EOL instead of the beginning and end of the entire input string.
IgnorePatternWhitespaceAllows pattern to have as much white space as desired, and also enables the use of in-pattern comments, using the (?# comment #) syntax.
SingleLineHas nothing to do with how many lines are in the input string. Rather, will cause the . (period) metacharacter to match any character, instead of any character except \n, which is the default.

Comments

Add New Comment