# Detecting Characters other the ASCII (Other than English)

**URL:** <https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757>\
**Category:** Rails\
**Created:** [May 25, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757 "2009-05-25T13:55:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ibrahim\_Mokdad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/db5fbb/32.png) [@Ibrahim\_Mokdad](https://www.ruby-forum.com/u/Ibrahim_Mokdad)\
**Post date:** [May 25, 2009, 1:55pm UTC](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757/1 "2009-05-25T13:55:19Z")

</div>

Dear all  
I kinda need help on a project I’m working on; and I’m stuck on the  
part were I have to detect any Unicode character in the text file;  
will regular expressions “\w” work ?  
thnx in advance

---

<div class="post-metadata">

**Author:** ![Ibrahim\_Mokdad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/db5fbb/32.png) [@Ibrahim\_Mokdad](https://www.ruby-forum.com/u/Ibrahim_Mokdad)\
**Post date:** [May 25, 2009, 6:27pm UTC](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757/2 "2009-05-25T18:27:10Z")

</div>

Ibrahim Mokdad wrote:

> Dear all  
> I kinda need help on a project I’m working on; and I’m stuck on the  
> part were I have to detect any Unicode character in the text file;  
> will regular expressions “\w” work ?  
> thnx in advance

Why not . (period) in a regular expression? That should do what you  
want.

## Best,

Marnen Laibow-Koser  
[http://www.marnen.org](http://www.marnen.org)  
removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![Ibrahim\_Mokdad](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/db5fbb/32.png) [@Ibrahim\_Mokdad](https://www.ruby-forum.com/u/Ibrahim_Mokdad)\
**Post date:** [May 25, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757/3 "2009-05-25T19:35:10Z")

</div>

No /w will not work. And . (period) will not work either.  
here is asdjflawæ—¥æœ¬erjocd some text  
the japanese within this text looks like this \346\227\245\346\234\254  
in unicode.  
it would not be matched by /w (letter or number set) or . (any  
character).  
each of the \ddd sets in the unicode character would be matched by a .  
(period)

I am sure someone has a solution for this, but it is not me.

unicode geniuses HEEEEELLLLLP ãã ã•ã„ã€‚  
tim

On May 25, 9:27Â am, Marnen Laibow-Koser \<rails-mailing-l…@andreas-
