in reply to Re: Pattern matching when there are exception strings
in thread Pattern matching when there are exception strings
use strict; use warnings; while(<DATA>){ print /(?<!XL5 )(?<![#_])ALPHA/ ? "OK\n" : "NOT OK\n"; } __DATA__ I AM ALPHA AND GOOD ALPHA I AM ALPHA AND BETA I AM ALPHA AND #ALPHA I AM ALPHA AND _ALPHA I AM ALPHA AND XL5 ALPHA I AM #ALPHA I AM _ALPHA I AM XL5 ALPHA __OUTPUT__ OK OK OK OK OK NOT OK NOT OK NOT OK
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Pattern matching when there are exception strings
by pboin (Deacon) on Sep 21, 2005 at 13:27 UTC | |
by chester (Hermit) on Sep 21, 2005 at 13:41 UTC | |
by sauoq (Abbot) on Sep 21, 2005 at 16:21 UTC | |
by davidrw (Prior) on Sep 21, 2005 at 14:45 UTC |