in reply to match character in a set, then match one of the other ones
Updated per moritz correction below.
So:
print $1 while 'hello' =~ m[(([a-z])(?!\2)[a-z])]g;; he lo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: match character in a set, them match one of the other ones
by moritz (Cardinal) on Aug 18, 2011 at 14:59 UTC | |
by BrowserUk (Patriarch) on Aug 18, 2011 at 15:13 UTC |