in reply to a regular expression problem
No need to execute any code inside a regular expression to solve your problem:
use strict; use warnings; use 5.010; # only required for say() $_ ='abacdbccdee'; if (/(?:[^bc]*[bc]){3}/g) { say pos; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: a regular expression problem
by siskos1 (Acolyte) on Feb 29, 2012 at 16:10 UTC |