in reply to Try this in Regexp palindrome
Note that it will leave just the 'a' from your example string, as it will find the longest, left-most palindrome in the string. Which in this case is the string 'a'.use Regexp::Common; s/.*?($RE{lingua}{palindrome}).*/$1/s;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Try this in Regexp palindrome
by Roy Johnson (Monsignor) on Mar 21, 2005 at 13:58 UTC |