Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Can this be a 1 line or simpler regex?

by IndyZ (Friar)
on Apr 05, 2003 at 07:28 UTC ( #248268=note: print w/replies, xml ) Need Help??


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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://248268]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-08-12 03:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?