in reply to Re: Question why this Regex isn't matching
in thread Question why this Regex isn't matching
$pieces[4] =~ m/>(^<+)</;
This regex wants a '>' character followed by ^ (hat metacharacter), the start of the string! That's not likely to occur in any string unless the /m regex modifier is used to allow ^ to match with embedded newlines (Update: Actually, even that won't happen. The match would have to be with something like / > \n ^ /xm because with the /m switch ^ will only match immediately after a newline or at the very start of the string). Did you perhaps mean something like m/>([^<]+)</?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Question why this Regex isn't matching
by OfficeLinebacker (Chaplain) on Sep 30, 2011 at 17:53 UTC | |
by ww (Archbishop) on Sep 30, 2011 at 18:54 UTC |