in reply to XML::RegExp doesn't work (Re: Is some string a legal XML Name?)
in thread Is some string a legal XML Name?

This looks weird.

XML::RegExp was released way before 5.6.0 though, so it is not that surprising that it does not deal that well with the utf8 pragma. Do you really need it around if you only deal with US ASCII characters?

Incidently the definition of Name includes regular characters:

$Letter = "(?:$BaseChar|$Ideographic)"; $NameChar = "(?:[-._:]|$Letter|$Digit|$CombiningChar|$Extender)"; $Name = "(?:(?:[:_]|$Letter)$NameChar*)";
  • Comment on Re: XML::RegExp doesn't work (Re: Is some string a legal XML Name?)
  • Download Code

Replies are listed 'Best First'.
Re: XML::RegExp doesn't work
by John M. Dlugosz (Monsignor) on Jun 08, 2001 at 22:52 UTC
    I know the $BaseChar includes regular characters. So the byte/char mode thing doesn't explain why it doesn't work at all, when the name to match is pure ASCII.

    I'm not dealing only with US ASCII. I'm reading UTF-8. This example was a simple case showing it fail.

    —John