Thanks to all. This worked:
<var-value>^[0-9\.\-\s]*$</var-value> > -----Original Message----- > From: Henrique VIECILI [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 20, 2004 1:37 PM > To: Struts Users Mailing List > Subject: Re: Simple Validator regex needed > > ^[\\d | \\s | \\. | \\-]*$ > > tested with java.util.regex > > Henrique Viecili > > ----- Original Message ----- > From: Tim Penhey > To: Struts Users Mailing List > Sent: Thursday, May 20, 2004 1:35 PM > Subject: RE: Simple Validator regex needed > > > > From: Eric Dahnke [mailto:[EMAIL PROTECTED] > > Sent: 20 May 2004 16:42 > > > > Hello list, > > > > The field should only accept numbers, spaces, dashes and periods. > > > > <var> > > <var-name>mask</var-name> > > <var-value>^[0-9]*$</var-value> > > </var> > > > > I can't figure the regext syntax out, I've tried all the following: > > > > <var-value>^[0-9]\.\s-*$</var-value> > > <var-value>^[0-9]\\.\\s-*$</var-value> > > <var-value>^[0-9].\s-*$</var-value> > > > > And a ton of other trial and error cases. Can someone help out. Thx. > > Wouldn't the regex ^[0-9\.-]*$ work? (not tested, just of the > top of my head). > > Tim > > > > > --------------------------------------------------------------------- > 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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]