[Home] [By Thread] [By Date] [Recent Entries]
Abel Braaksma wrote:
forgot to mention: the rules of greediness are interesting in this last example. Suppose you turn it around: regex: (.)|(t) now, you may thing that regex-group(1) contains all other chars and regex-group(2) will contain all 't' characters. Alas, this is not so. Though regex-group(2) exists and will not raise an error (luckily), it will never match anything, i.e., will always be empty. This is because the greediness rules will match (.) for everything, including any 't' character, succeeding before right away. So, the above acts the same as: regex: (.)
|

Cart



