Project

General

Profile

Actions

Backport #7972

closed

Regex Posix space class seems location-sensitive in Ruby 2.0.0-p0

Added by jdashton (J Daniel Ashton) about 11 years ago. Updated about 11 years ago.


Description

This regex

/[^[:space:]\d\-,\.]/ 

matches as expected in 1.9.3. But in 2.0.0-p0 this regex fails to match unless the space class is moved later in the class. For example, both of the following work as expected:

/[^\d[:space:]\-,\.]/
/[^\d\-,\.[:space:]]/

See http://stackoverflow.com/questions/15076507/regex-slightly-different-in-ruby-2/

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0