Regular Expression amendment

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kieran

    #1

    Regular Expression amendment


    Hi,

    I am using the following regular expression in a validation control in
    a web form. I found the expression somewhere on the internet ages ago.

    It ensures the user enters only letters before they do a search.
    However i now need to allow the user to enter full stops - '.' - but am
    unsure how to amend this regular expression to allow this.

    Can anyone see how to do this.

    Thanks.


    ^[a-zA-Z]+(([\'\,\.\- ][a-zA-Z ])?[a-zA-Z]*)*$

Working...