Re: regex with HEX ascii chars

2018-04-12 Thread Shlomi Fish
On Thu, 12 Apr 2018 17:26:57 +0100 Gary Stainburn wrote: > I have a text file (created by pdftotext) that I've imported into my script. > > It contains ASCII characters 251 for crosses and 252 for ticks. If I load > the file in gvim and do :as > > it reports the characters as > > 251, Hex

Re: regex with HEX ascii chars

2018-04-12 Thread Andy Bach
> However, when I try to seacch for it using if ($line=~/[\xfb|\xfc]/) { Note, you're mixing the character class " [ab] " with grouping alternative pipe " ( a | b ) " here > or even just if ($line=~/\xfb/) { Dunno, works here: $ perl -e '$line = "hi" . chr 251 . "ho" . chr 252 ; if ($line=~/

regex with HEX ascii chars

2018-04-12 Thread Gary Stainburn
I have a text file (created by pdftotext) that I've imported into my script. It contains ASCII characters 251 for crosses and 252 for ticks. If I load the file in gvim and do :as it reports the characters as 251, Hex 00fb, Octal 373 252, hex 00fc, Octal 374 However, when I try to seacch f