in reply to use of built-in function in regex...
/(.*?)(??{ quotemeta reverse $1 })/s [download]
Of course, (.*?) can match a zero-length string. And since it's not anchored, it will always match "". Remove the "?".