regex - Match unicode text with Ruby 1.8.7 -


i have regex used matching unicode string , works pretty cool versions of ruby newer 1.8.7:

/[\p{l}\p{space}]+/u 

how can achieved ruby 1.8.7?

unicode properties added in ruby version 1.9, in older versions have use posix classes [:space:] or [:alpha:]

see posix bracket expressions more details.


Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -