in reply to Re^3: Using pos() inside regexp (no /e)
in thread Using pos() inside regexp
The pos() works only outside of matching.
Except when it works inside of matching ;)
$ perl -le'() = "abcdef" =~ /..(?{ print pos() })/g;' 2 4 6
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Using pos() inside regexp (no /e)
by Anonymous Monk on Oct 12, 2010 at 08:05 UTC | |
by ikegami (Patriarch) on Oct 12, 2010 at 15:25 UTC | |
by andal (Hermit) on Oct 13, 2010 at 08:58 UTC | |
by ikegami (Patriarch) on Oct 13, 2010 at 16:02 UTC | |
by andal (Hermit) on Oct 14, 2010 at 10:03 UTC | |
|