www.webdeveloper.com
Results 1 to 2 of 2

Thread: Problem in regular expression in text in other language then english

  1. #1
    Join Date
    May 2006
    Posts
    72

    Problem in regular expression in text in other language then english

    Hello

    I found this site:
    http://www.regular-expressions.info/...ptexample.html

    I change the regular expression to this: "\b[\x00-\xFF]+\b"
    and it find all as except.

    but when I copy to there text in Hebrew or Arabic, it is not find anything

    What is the problem?

  2. #2
    Join Date
    Mar 2007
    Location
    U.K.
    Posts
    1,127
    Quote Originally Posted by nadavvin
    Hello

    I found this site:
    http://www.regular-expressions.info/...ptexample.html

    I change the regular expression to this: "\b[\x00-\xFF]+\b"
    and it find all as except.

    but when I copy to there text in Hebrew or Arabic, it is not find anything

    What is the problem?
    You have shown that regex in quotes - are you creating it using new RegExp()? If so, then all backslashes must be escaped - \\.
    Secondly, that expression searches character codes 0-ff (0-255). For Hebrew I believe you need something in the range: \u0590-\u05ff
    Where used, return should be executed unconditionally and always as the last statement in the function.

    That's my signature, it's not part of the damn post!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles