in reply to
Conditional regex
Seems like it could be a little more straightforward:
/^(\w+)(\w*)\2\1$/
[download]
The PerlMonk
tr///
Advocate
Comment on
Re: Conditional regex
Download
Code
In Section
Seekers of Perl Wisdom