Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Try this in Regexp palindrome

by Roy Johnson (Monsignor)
on Mar 21, 2005 at 14:18 UTC ( [id://441206]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $_ = 'abcdegedfc'; # Try it without the g, too.
    my $re;
    $re = qr/((.)(?:(??{$re})|.?)\2)/;
    print "$1\n" while (/(?=$re)/g);
    
  2. or download this
    $_ = 'abcdegedfc';
    print "$1\n" while (/(?=((.+).?(??{quotemeta reverse $2})))/g);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://441206]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (7)
As of 2024-04-19 16:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found