in reply to Re^2: PCRE: Repeating Subpattens After Intervening Characters
in thread PCRE: Repeating Subpattens After Intervening Characters
my $regex = qr/\d\s+foo/; $some_string =~ /($regex)[^\r\n]*($regex)/;
Also, your solution doesn't scale (if capturing is desired). He can't say, for example, the following while capturing what $regexp matches:
my $regex = qr/\d\s+foo/; $some_string =~ /(?:$regex[^\r\n]*)*($regex)/;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: PCRE: Repeating Subpattens After Intervening Characters
by QM (Parson) on Sep 14, 2005 at 23:36 UTC | |
by ikegami (Patriarch) on Sep 15, 2005 at 01:28 UTC |