POSIX regex character classes on Windows Platform

K

Kevin

I've been mucking about with regular expressions and have not managed
to get the POSIX style character classes (i.e., [:alnum:]) to work for
me. Is this a limitation of the platform I'm using, or am I missing
some setting somewhere?

Ruby 1.8.2 on WinXP (used the one-click installer).

-Kevin
 
W

William James

Kevin said:
I've been mucking about with regular expressions and have not managed
to get the POSIX style character classes (i.e., [:alnum:]) to work for
me. Is this a limitation of the platform I'm using, or am I missing
some setting somewhere?

Ruby 1.8.2 on WinXP (used the one-click installer).

-Kevin

irb(main):010:0> p "@@@ abc".scan( /[[:alnum:]]+/ )
["abc"]

irb(main):001:0> p RUBY_PLATFORM, RUBY_VERSION
"i386-mswin32"
"1.8.2"
 
K

Kevin Olbrich

A missing set of brackets will get ya every time.

Thanks.

-----Original Message-----
From: William James [mailto:[email protected]]
Sent: Wednesday, August 10, 2005 08:56 PM
To: ruby-talk ML
Subject: Re: POSIX regex character classes on Windows Platform


I've been mucking about with regular expressions and have not managed
to get the POSIX style character classes (i.e., [:alnum:]) to work for
me. Is this a limitation of the platform I'm using, or am I missing
some setting somewhere?

Ruby 1.8.2 on WinXP (used the one-click installer).

-Kevin

irb(main):010:0> p "@@@ abc".scan( /[[:alnum:]]+/ )
["abc"]

irb(main):001:0> p RUBY_PLATFORM, RUBY_VERSION
"i386-mswin32"
"1.8.2"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top