AFAIK \p{Alpha}, \p{javaLowerCase}, \p{Lower} and others mentioned all deal with ascii
If you want to match any letter in any language then \p{L} and that matches accented ones as well. On Mon, Sep 21, 2009 at 1:41 PM, Madtyn <mad...@gmail.com> wrote: > I already use quickRex, a wonderful and handy tool but I didn't know > which flavour did I have to use, so I was confused about that. > > About the \p{javaLowerCase}\p{javaUpperCase}, it seems to have > problems with 'ñ' spanish letter and letters with graphical accents. > Maybe I did something wrong. I finally put: > > nombre-regexp=^[\p{javaLowerCase}\p{javaUpperCase}\p{javaWhitespace}]+$ > apellidos-regexp=^[\p{javaLowerCase}\p{javaUpperCase}\p{javaWhitespace}-]+$ > > Only added the whitespace for composite names to be possible. > > > Anyway, the other pattern seems to work perfectly now. > > If someone is interested, these are the patterns I use: > > nombre-regexp=^([a-zÑñçÇA-ZáéíóúÁÉÍÓÚ ])+ > apellidos-regexp=^([a-zÑñçÇA-ZáéíóúÁÉÍÓÚ -])+ > > Almost identical to the Alejandro's one. > > > > Thanks, Thiago, Martin > and Alejandro. > > > > > > 2009/9/21 Martin Strand <do.not.eat.yellow.s...@gmail.com>: >> There are java specific operators that match letters: >> \p{javaLowerCase} >> \p{javaUpperCase} >> >> So to make sure a string only contains letters (in any language) you could >> do this: >> >> ^[\p{javaLowerCase}\p{javaUpperCase}]+$ >> >> >> If you're using Eclipse you might find this plugin handy, it allows you to >> test regular expressions with ease: >> http://bastian-bergerhoff.com/eclipse/features/web/QuickREx/toc.html >> http://bastian-bergerhoff.com/eclipse/features/web/installation.html >> >> Martin >> >> On Mon, 21 Sep 2009 00:33:11 +0200, Madtyn <mad...@gmail.com> wrote: >> >>> Hello! >>> >>> I have some doubts about the regexp validators in Tapestry. I have >>> learnt some about regexp but after making some validating with >>> success, I haven't been able to do two things: >>> >>> 1) Which flavour of regexp does Tapestry use? I have looked for it on >>> the Internet but I couldn't find out. I know that there are the regexp >>> from Javascript, Jakarta and many others but I don't know which one of >>> them Tapestry's belongs to. >>> >>> 2) Because of the former, I can't make a correct regexp for name and >>> surname fields. I've tried the following: >>> >>> nombre-regexp=^([a-zÑñA-Z _.-])+ // This is the name >>> apellidos-regexp=^([a-zÑñA-Z _.-])+ // This is the surname >>> >>> I'm trying to avoid all characters which are not letters, (you >>> shouldn't have a name containing numbers, dots....) but this is the >>> more accurate I got and allow numbers (not at the beginning) and it's >>> not what I want. >>> >>> Maybe some spanish Tapestry experts around here could help me with >>> getting the 'ñ' spanish letter into the regular expressión, as well as >>> accents. >>> >>> >>> Thank you very much on advance. >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org >> For additional commands, e-mail: users-h...@tapestry.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org > For additional commands, e-mail: users-h...@tapestry.apache.org > > -- Andreas Andreou - andy...@apache.org - http://blog.andyhot.gr Tapestry / Tacos developer Open Source / JEE Consulting --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org