in reply to Re: Why do these regex variants behave as they do?
in thread Why do these regex variants behave as they do?
/me slaps head;
...wishes he could award multiple ++ to both BrowserUk and AnomalousMonk for clear, concise and brilliantly on-target replies.
I had played with a char class at some point in this evolution... and didn't quite nail it (didn't event come close?). But your answers made it clear that one "right" (YMMV) approach with a class is:
#4 Non-capture (grouping) paren-pair contains the capture parens which + use a char_class if ( $string4 =~ />(?:([\s|\w]+))(?:<\/td>)/m ) { say "regex 4: $1"; }
Again, thanks for spotting my blind-spots!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Why do these regex variants behave as they do?
by AnomalousMonk (Archbishop) on Oct 03, 2011 at 01:23 UTC |