in reply to Bgeinner regex question
my $string = '123perl456perl789perl10'; while ($string =~ /(?<=(..))perl(?=(..))/g) { print "$1perl$2\n"; }
Where (?<=...) means "is immediately preceded by", and (?=..) stands for "is immediately followed by". The look around assertions are not part of capturing (that's why you need to add capturing parentheses into the assertions), and they don't affect the position of the match.
($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
|
|---|