PrintLogo

Matching Hex Characters With Perl




You can match hex characters with \x. Just put \x before the hexadecimal number. For instance, if you wish to replace all backspace characters with nothing, use this:

perl -pi -e "s|\x08||g" file.txt





This article comes from NetAdminTools:
http://www.netadmintools.com/

The URL for this story is:
http://www.netadmintools.com/art415.html

Copyright 1997-2008 NetAdminTools.com. Read our Terms of Use.