in reply to RegExp to exclude 2-byte characters

By two byte chars I presume you mean they are from the unicode charset. Looking through the utf pages in the docs I get the impresion that your syntax may be a bit off. I had a play with the following code and had no problems deleting pairs of chars...

use utf8; my $data = "\x{200}\x{201}\x{102}\x{200}\x{210}\x{375}\x{ab}\x{263A}"; # XXXXXXXXXXXXX XXXXXXXXXXXXX # Blocks marked with an x are deleted print $data, "\n"; $data =~ s/ (\x{201}[\x{101}-\x{114}]| \x{202}[\x{237}-\x{262}]| \x{203}[\x{100}-\x{177}]| \x{203}[\x{200}-\x{227}]| \x{210}[\x{237}-\x{375}]) //gx; print $data;

I hope this goes some way towards helping.

$japh->{'Caillte'} = $me;

Replies are listed 'Best First'.
(tye)Re2: RegExp to exclude 2-byte characters
by tye (Sage) on Apr 10, 2001 at 22:00 UTC

    "\201" is pack("C",0201) [that is, octal] while "\x{201}" is closer to pack("S",0x201) [that is, using hexadecimal].

            - tye (but my friends call me "Tye")