0

I saw many solutions that match Latin characters words like this one: /^\W*(\w+\b\W*){80,}$/ I'm looking for the equivalent expression that will support any language with Unicode characters.

The RegEx need to be JavaScript compatible.

Roy Peleg
  • 1,000
  • 2
  • 8
  • 25
  • Maybe this would help? http://stackoverflow.com/questions/150033/regular-expression-to-match-non-english-characters – gitaarik Mar 26 '14 at 09:23

1 Answers1

0

EDIT: Javascript sadly doesn't seem to support this solution... You might want to look into XRegEx

I'll leave this here in case it's of use for anyone in another language more Perl compatible, but this doesn't answer your question, sorry.


For unicode support you can use the \p{...} pattern.

Your pattern would become

/^\P{L}*(\p{L}+\P{L}*){80,}$/

Here \P{L} stands for anything but a letter, \p{L} for any letter (but not a digit or a _, so it's a little bit different from \w)

Robin
  • 9,415
  • 3
  • 34
  • 45