Update:$_ = "one\ttwo\nthree four five\r"; s/(\t)|(\n)|(\r)|(\f)/ ($1 && '\t' || '') . ($2 && '\n' || '') . ($3 && '\r' || '') . ($4 && '\f' || '') /ge;
$_ = "one\ttwo\nthree four five\r"; s/(\t)|(\n)|(\r)|(\f)/ $1 ? '\t' : $2 ? '\n' : $3 ? '\r' : $4 ? '\f' : '' /ge;
Makeshifts last the longest.
In reply to Re: Can this be a 1 line or simpler regex?
by Aristotle
in thread Can this be a 1 line or simpler regex?
by smackdab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |