# Regexp match error on windows and unicode error on linux

**URL:** <https://www.ruby-forum.com/t/regexp-match-error-on-windows-and-unicode-error-on-linux/188349>\
**Category:** Ruby\
**Created:** [May 10, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/regexp-match-error-on-windows-and-unicode-error-on-linux/188349 "2010-05-10T17:01:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@dominic](https://www.ruby-forum.com/u/dominic)\
**Post date:** [May 10, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/regexp-match-error-on-windows-and-unicode-error-on-linux/188349/1 "2010-05-10T17:01:40Z")

</div>

Hi,

I have a small problem with Regexp to match accented latin letters. I  
need this to match french words and [\wÃ©Ã¨Ã Ã‰Ã€…] is the only way I found  
that works for me but it’s not great.

I made a test file encoded in UTF-8

* * *

#coding: UTF-8

puts “Ã© accepted by [a-z]” if “Ã©” =~ /[a-z]/  
puts “Ã© accepted by \w” if “Ã©” =~ /\w/  
puts “Ã© accepted by \p{L}” if “Ã©” =~ /\p{L}/

**END**

On windows 7 with Ruby1.9 I get:  
Ã© accepted by p{L}

On linux I get and error:  
test.rb:5: invalid character property name {L}: /\p{L}/

then if I remove line 5 I get:  
Ã© accepted by \w

Errors seems to come from my Ruby installation and we can see that it  
would be perfect if we combine the skills of the one on windows with the  
one on linux.

Does anyone have a solution to correct the \w of windows or the error on  
linux ? only one would be great.

Thanks

---

<div class="post-metadata">

**Author:** ![dominic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@dominic](https://www.ruby-forum.com/u/dominic)\
**Post date:** [May 10, 2010, 7:19pm UTC](https://www.ruby-forum.com/t/regexp-match-error-on-windows-and-unicode-error-on-linux/188349/2 "2010-05-10T19:19:01Z")

</div>

> On windows 7 with Ruby1.9 I get:  
> Ã© accepted by p{L}
> 
> On linux I get and error:  
> test.rb:5: invalid character property name {L}: /\p{L}/
> 
> then if I remove line 5 I get:  
> Ã© accepted by \w
> 
> Errors seems to come from my Ruby installation and we can see that it  
> would be perfect if we combine the skills of the one on windows with the  
> one on linux.
> 
> Does anyone have a solution to correct the \w of windows or the error on  
> linux ? only one would be great.

[http://www.ruby-forum.com/topic/208777](http://www.ruby-forum.com/topic/208777)

seems to fit the bill (if you’re using different versions of ruby on the  
two). Maybe you can enlighten us all when you find a fix 🙂

-rp

---

<div class="post-metadata">

**Author:** ![dominic](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/13edae/32.png) [@dominic](https://www.ruby-forum.com/u/dominic)\
**Post date:** [May 10, 2010, 8:04pm UTC](https://www.ruby-forum.com/t/regexp-match-error-on-windows-and-unicode-error-on-linux/188349/3 "2010-05-10T20:04:55Z")

</div>

I think there is no solution but reporting a bug
