in reply to Regular expression to match an A=B type string needs help in storing matched parts of string
As for your other question, you have the regexes reversed: it only prints one 'a' in the first regex. This is because your capturing parens are only capturing one 'a' and the multiplier is outside of the one character that it's capturing. In your second regex, the parens are capturing everything because the multiplier is inside./[^=]+[=]'([^']+)'/
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.
|
|---|