Opened 11 years ago

Closed 11 years ago

#696 closed Support Requests (Works For Me)

replacing IsBasicLatin in extanded syntax

Reported by: nobody Owned by: nobody
Milestone: Component: None
Version: None Severity:
Keywords: Cc:


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:


I don't understand the problem, or how I can make it 

Thanks, Moddy.

Attachments (0)

Change History (1)

comment:1 Changed 11 years ago by John Maddock

Status: assignedclosed
Logged In: YES 

In the docs for POSIX regular expressions here:

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.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain nobody.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.