http://qs1969.pair.com?node_id=248268


in reply to Can this be a 1 line or simpler regex?

This works:

s/([\t\n\r\f])/%m=("\t","\\t","\n","\\n","\r","\\r","\f","\\f");$m{$1}/ge;

but it just feels dirty.

--
IndyZ