Help with regex

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
rbfabbri
Forum Newbie
Posts: 2
Joined: Sun Jun 21, 2009 10:19 am

Help with regex

Post by rbfabbri »

Hi, please somebody help me.

I'm needing a regex that accepts strings with:

- A-Z uppercase or lowercase;
- white space;
- dot (.)

Example:
"John", "J. ohn", ".j.O.h.N", "....John" ...

I tried to make one but no success.

Thanks!!!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Help with regex

Post by Christopher »

rbfabbri wrote:- A-Z uppercase or lowercase;
- white space;
- dot (.)
Something lke "/^[A-Za-z \.]*$/ should work
(#10850)
Post Reply