Boost C++ Libraries: Ticket #696: replacing IsBasicLatin in extanded syntax
https://svn.boost.org/trac10/ticket/696
<pre class="wiki">I'm trying to create an expression that replaces the \p
{IsBasicLatin}, that is [\x00-\x7F]. I manage to do it
with PERL syntax, but not with 'extended' or 'awk'. It
simply doesn't find what I want it to find.
The expressions I've tried are:
[\\x00-\\x7F]
[\\x{00}-\\x{7F}]
[[.NUL.]-[.DEL.]]
I don't understand the problem, or how I can make it
work.
Thanks, Moddy.
</pre>en-usBoost C++ Libraries/htdocs/site/boost.png
https://svn.boost.org/trac10/ticket/696
Trac 1.4.3John MaddockSun, 30 Jul 2006 16:01:16 GMTstatus changed
https://svn.boost.org/trac10/ticket/696#comment:1
https://svn.boost.org/trac10/ticket/696#comment:1
<ul>
<li><strong>status</strong>
<span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span>
</li>
</ul>
<pre class="wiki">Logged In: YES
user_id=14804
In the docs for POSIX regular expressions here:
file:///c:/data/boost/develop/boost/libs/regex/doc/syntax_extended.html
It says:
Character ranges:
For example [a-c] will match any single character in the
range 'a' to 'c'. By default, for POSIX-Extended regular
expressions, a character x is within the range y to z, if it
collates within that range; THIS RESULTS IN LOCAL SPECIFIC
BEHAVIOUR . This behavior can be turned off by unsetting
the collate option flag - in which case whether a character
appears within a range is determined by comparing the code
points of the characters only.
So use boost::regex::extended & ~boost::regex::collate as
the syntax type to force character ranges to be independent
of the locale.
HTH, John.
</pre>
Ticket