Closed ghost closed 11 years ago
If you are looking for a ahead(right) zero-width match.
You should use (?=pattern)
.
'G(?=O)' match:
GO
^
If you are looking behind(left)
You should change the order of your pattern to (?<=O)G
This match 'G' follows 'O'
OG
^
ref: perlre
:-O Thanks!
Wrong:
Correct: