using sp space in character classes

2007-04-12 Thread Brad Bowman

Hello,

In S05, sp is listed under named assertions and isn't explicitly
mentioned in the section on character classes.

Can sp be used in character classes, in particular to include or
exclude space (U+0020)?  eg. space-sp,  alnum+sp

Is there another way to do this, maybe [\ ] escaping?

Thanks,

Brad

--
There are two things that will blemish a retainer, these are riches and
honor. But if one remains in strained circumstances he will not be
marred. -- Hagakure http://bereft.net/hagakure/


Re: using sp space in character classes

2007-04-12 Thread Larry Wall
On Thu, Apr 12, 2007 at 06:20:45PM +1000, Brad Bowman wrote:
: Hello,
: 
: In S05, sp is listed under named assertions and isn't explicitly
: mentioned in the section on character classes.
: 
: Can sp be used in character classes, in particular to include or
: exclude space (U+0020)?  eg. space-sp,  alnum+sp

Yes, but so far PCR only recognizes things that translate to [[:foo:]] or
\p{foo} within character classes.  It still needs to be generalized
to allow any subrules that can be interpreted as character classes.

: Is there another way to do this, maybe [\ ] escaping?

I believe -[\x20] works currently.

Larry