Boost logo

Boost Users :

Subject: Re: [Boost-users] [regex] problem w/ regex::extended
From: Mark R Stallard (stallard_at_[hidden])
Date: 2015-02-16 08:57:50

U. Mutlu <for-gmane_at_[hidden]> wrote:

> Thank you.
> But on the "POSIX Extended Regular Expression Syntax" page
> the escape sequence \w is very well listed:

I should have explained this more thoroughly. I did not say
that POSIX does not support \w at all. What I said was:

> I suspected that Perl would support the escape sequence \w
> inside a [] character set, but POSIX extended might not.
> The tests I ran affirmed those suspicions.

POSIX extended supports \w, but NOT inside a [] character set.
For POSIX extended, the regex [\w\-\.~/]+ is the same as
[w\-\.~/]+. Inside of [], POSIX extended sees \w as a
literal "w".

You can test this yourself if you have an up-to-date version
of the egrep shell command.

|+| M a r k |+|
  Mark Stallard
  Business Application Services
  Global Business Services Information Technology
  Raytheon Company
  880 Technology Drive
  Billerica, MA 01821
  This message contains information that may be confidential and privileged.
  Unless you are the addressee (or authorized to receive mail for the
  addressee), you should not use, copy or disclose to anyone this message or
  any information contained in this message. If you have received this message
  in error, please so advise the sender by reply e-mail and delete this
  message. Thank you for your cooperation.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at