Sunday, November 28, 2010

Common Punctuation

I know its not so much Cake question so forgive me ahead of time.

 

But does anyone know a regex for common punctuation? I want to put validation on my “City” field where it’s a-z and also allow ‘ – and . City should not have any numbers. Open to any other ideas that you have used also as I hate regex. I do not want people putting in crazy fake names. Almost impossible to verify the name they enter (imagine that db table of every possible name of every city / town in the world) so I would like to ensure its within the realm of being real.

St.Louis has (.)

St.John’s (.  And ’ )

And other have the – separating words of the name. Cant think of any else? Any help would be great.

 

Thanks,

 

Dave

No comments: