Any (simple) tool to create and manage regular expressions?

Thanks

Marco ;)


On Thu, 24 Mar 2005 09:28:20 -0800, Jaswinder Kaur <[EMAIL PROTECTED]> wrote:
> Thanks a lot. It work....
> 
> Thanks
> 
> 
> -----Original Message-----
> From: Greg Pelly [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 23, 2005 6:12 PM
> To: Struts Users Mailing List
> Subject: RE: Validation - Mask
> 
> Add a ^ to the beginning of the pattern. Try changing:
>  <var-value>[^/$&amp;=]+$</var-value>
> To
>  <var-value>^[^/$&amp;=]+$</var-value>
> 
> That should work.
> 
> If you're not familiar with regular expressions, a ^ at the beginning of a
> regexp matches the string starting at the beginning (just as the $ matches
> at the end).  Without it, as long as _something_ comes before the forbidden
> characters, the mask will return true.
> 
> To see the difference, paste this Javascript into an HTML doc.
> 
> <script>
>  var pattern = /[^&$]+$/; //"this" will match in the regular expression
>  alert (pattern.exec("this& is a Test")) ;
> 
>  var pattern = /^[^&$]+$/; //regexp will fail.
>  alert (pattern.exec("this& is a Test")) ;
> </script>
> 
> Greg
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> "Attention: This message is intended only for the individual to whom it is
> addressed and may contain information that is confidential or privileged. If
> you are not the intended recipient, or the employee or person responsible for
> delivering it to the intended recipient, you are hereby notified that any
> dissemination, distribution, copying or use is strictly prohibited. If you
> have received this communication in error, please notify the sender and
> destroy or delete this communication immediately."
> ==============================================================================
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to