Lets see if I can help, I hope my regex skills aren't totally rusty.
That regualar expression will only match exactly one word character then one whitespace character
then another word character. (A word character is in the set of a-zA-Z0-9_)
Try using this regex <var-value>^\w*\s\w*$</var-value> hopefully it will solve your problem.
-Rob
Leonard Sitongia wrote:
I'm using Struts 1.1. I have an html:text input field.
I'm trying to constrain the input field to be two strings separated by a space.
I have tried
<var-value>\w\s\w</var-value>
but that allows two *or more* strings separated by spaces, such as "xxx yyy zzz".
I have tried using the boundary matchers, as in
<var-value>^\w\s\w$</var-value>
Then no input works. I thought I read that ^ and $ are required in 1.1, but I can't get it to work with them.
It's not then expecting literal ^ and $, but I don't know what it's doing.
TIA. ==Leonard E. Sitongia VETS / Scientific Computing Division National Center for Atmospheric Research P.O. Box 3000 Boulder CO 80307 USA [EMAIL PROTECTED] voice: (303)497-2454 fax: (303)497-1829
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]