struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pierre Thibaudeau" <>
Subject Re: Validation "Mask": unicode characters
Date Sat, 08 Dec 2007 18:45:32 GMT
Well, it seems my question got people stumped as much as I am!

For an alternative solution, I would love advice on a (working) regex
expression that would approximate the class of characters I am aiming at:
say all the letters of the Latin1 set (ISO-8859-1).  If we could eventually
supplement that with Greek, Cyrillic, Arabic and Hebrew alphabets, that
would probably cover more than all the ground I need.

2007/12/6, Pierre Thibaudeau <>:
> I am using Struts 1 (more specifically 1.3.8).
> I have a form for which I use the Struts Validator.
> One of the textual fields should be able to accept any alphabetic
> character, as well as spaces and apostrophes.
> By "alphabetic characters", I don't merely mean [a-zA-Z], but I am also
> interested in:
> e acute,
> a umlaut,
> omega,
> aleph,
> and (while we're at it) Sanskrit characters.
> But I want neither Arabic numerals, nor signs of punctuation (other than
> the apostrophe), nor tabs, nor underscores, etc.
> I thought this might do it (but it doesn't work):
>             <field property="name" depends="mask">
>                 <msg name="mask" key="error.nameMask"/>
>                 <var><var-name>mask</var-name><var-value>^[\p{L}\'
> ]*$</var-value></var>
>             </field>
> The symbol "\p{L}" (which means "any Unicode letter" in Java regex)
> doesn't seem to do its job...
> Suggestion anyone?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message