pkumar.pr has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
Is it possible to use built-in function like "reverse" inside regex.
for example: If there is a string "isasdffdsakk" I want to capture "asdffdsa" by using reverse function inside regex.
$string = 'isasdffdsakk'; if($string =~ /(.*?)(reverse\1)/s){ print $1,$2; }
Thank you.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: use of built-in function in regex...
by ikegami (Patriarch) on Aug 06, 2010 at 05:03 UTC | |
Re: use of built-in function in regex...
by murugu (Curate) on Aug 06, 2010 at 05:04 UTC | |
Re: use of built-in function in regex...
by suhailck (Friar) on Aug 06, 2010 at 06:02 UTC |