in reply to Re^2: How to start regexp from a X position
in thread How to start regexp from a X position

for ('<1>', '<2>', '<3>') { $x =~ /^(.*<\d>)/$1$_/s; }
is just a complicated way of doing
$x =~ /^(.*<\d>)/$1<1><2><3>/s;

Replies are listed 'Best First'.
Re^4: How to start regexp from a X position
by pkt (Initiate) on Oct 07, 2008 at 12:27 UTC

    Yes Ikegami you right, i really try to understand how the pos function works and c and \G modifiers, as say the perlmonk's rule i put a simple example to try to demostrate what's I want to do

    thank I very appreciate the effort you people

      See the bottom bit of "What good is \G in a regular expression?" in perlfaq6 for a useful purpose for /c. Probably the only useful purpose for it :)