The regular expression: (?i-msx:reg(ular\s+)?exp?(ression)?) matches as follows: NODE EXPLANATION --------------------------------------------------------- (?i-msx: group, but do not capture (case-insensitive) (with ^ and $ matching normally) (with . not matching \n) (matching whitespace and # normally): --------------------------------------------------------- reg 'reg' --------------------------------------------------------- ( group and capture to \1 (optional (matching the most amount possible)): --------------------------------------------------------- ular 'ular' --------------------------------------------------------- \s+ whitespace (\n, \r, \t, \f, and " ") (1 or more times (matching the most amount possible)) --------------------------------------------------------- )? end of \1 (NOTE: because you're using a quantifier on this capture, only the LAST repetition of the captured pattern will be stored in \1) --------------------------------------------------------- ex 'ex' --------------------------------------------------------- p? 'p' (optional (matching the most amount possible)) --------------------------------------------------------- ( group and capture to \2 (optional (matching the most amount possible)): --------------------------------------------------------- ression 'ression' --------------------------------------------------------- )? end of \2 (NOTE: because you're using a quantifier on this capture, only the LAST repetition of the captured pattern will be stored in \2) --------------------------------------------------------- ) end of grouping ---------------------------------------------------------(2004-12-20 12:32:38)
2004-12 / 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31