In your original code you forgot to escape the last pipe. Fixing that should do the trick.
In reply to Re^3: Perl Regex by hdb in thread Perl Regex by Buddyhelp