I'm using ruby 1.9 and trying to find out which regex I need to make this true:
Encoding.default_internal = Encoding.default_external = 'utf-8'
"föö".match(/(\w+)/u)[1] == "föö"
# => false
I'm using ruby 1.9 and trying to find out which regex I need to make this true:
Encoding.default_internal = Encoding.default_external = 'utf-8'
"föö".match(/(\w+)/u)[1] == "föö"
# => false
http://www.ruby-forum.com/topic/208777
and
http://www.ruby-forum.com/topic/210770
might have clues for you
You can also use the (documneted) \p{L} property:
chastell@devielle:~$ ruby -ve "p '℉üüü' =~ /\p{L}/" ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-linux] 1