in reply to Pattern Matching, left-to-right

Untested:
$string =~ s/(\\(?:[FSTRE]\\)+)/ my $x = $1; $x =~ tr#FSTRE\\#|^&-\\#d; $x; /ge;

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.


update: Ooops... I saw the \T\F\S\ in the source string, and figured that this was supposed to translate to &^|, when in fact the example says it translates to &F|. Ignore me. Other answers are better.