It just plain doesn't match anything! Looking at the module, I think it's a UTF-8 issue. E.g.
$Ideographic = '(?:\xE3\x80[\x87\xA1-\xA9]|\xE4(?:[\xB8-\xBF][\x80-\xB +F])|\xE5(?:[\x80-\xBF][\x80-\xBF])|\xE6(?:[\x80-\xBF][\x80-\xBF])|\xE +7(?:[\x80-\xBF][\x80-\xBF])|\xE8(?:[\x80-\xBF][\x80-\xBF])|\xE9(?:[\x +80-\xBD][\x80-\xBF]|\xBE[\x80-\xA5]))';
That is, \xE3 followed by \x80 \x87 are individual bytes in a UTF-8 encoded string, which won't match a real \x{2007} in the string.

However, my test data are normal ASCII range characters, and that doesn't succeed either, though it starts $BaseChar = '(?:[a-zA-Z]|\xC3[\x80-\x9.... So I don't know everything that's wrong with it, but it doesn't work at all (see below) if utf8 is used.

use strict; use warnings; use utf8; # comment this line out and it matches use XML::RegExp; my $name= 'timestamp'; # contains plain ASCII letters only! my $result= $name =~ /^$XML::RegExp::Name$/o; print "result is $result\n";

In reply to XML::RegExp doesn't work (Re: Is some string a legal XML Name?) by John M. Dlugosz
in thread Is some string a legal XML Name? by John M. Dlugosz

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.