in reply to Re: Shift regex search back 4 characters...
in thread Shift regex search back 4 characters...
A variation that doesn't require foreknowledge of the backward step length:
c:\@Work\Perl\monks>perl -wMstrict -le "$_ = '222,345,222,678,222,223,224,543,111,222'; ;; while ( /22[2345],(\d\d\d)/g ) { print qq{after 22n: '$1'}; pos = $-[1]; } " after 22n: '345' after 22n: '678' after 22n: '223' after 22n: '224' after 22n: '543'
Give a man a fish: <%-{-{-{-<
|
|---|