in reply to Command Line Regex
Bear in mind that values %00-%1F and %7F won't be things that you can "read" very well -- in fact, if you encounter %0D without an adjacent %0A, the resulting display could be very misleading. You might want to limit the regex to:perl -i.bak -pe 's/\%([0-7][0-9A-F])/chr(hex($1))/ge'
s/\%([2-6][0-9A-F]|7[0-9A-E])/chr(hex($1))/ge
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Command Line Regex
by parv (Parson) on Apr 07, 2006 at 05:01 UTC |