in reply to match a range of characters multiple times but they might scattered in the string
use warnings; use strict; while (<DATA>) { my @ms = /[ARKYGZX]/g; print if @ms == 2 or @ms == 3; } __DATA__ AAgoodpeople AgoodApeople XgoodpeopleK ARKYgoodpeopleGZX goodpeopleGZX
Prints:
AAgoodpeople AgoodApeople XgoodpeopleK goodpeopleGZX
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: match a range of characters multiple times but they might scattered in the string
by AnomalousMonk (Archbishop) on Feb 27, 2013 at 01:23 UTC |