no special charactors

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

Moderator: General Moderators

Post Reply
cardi777
Forum Commoner
Posts: 54
Joined: Sun Mar 29, 2009 4:26 am

no special charactors

Post by cardi777 »

Hi all,

i have the expression that works well, but doesn't allow for spaces in the text. Does anyone know how I can fi this?

Code: Select all

/^[0-9a-zA-Z]+$/
I don't know regex well at all. Hoping its an easy one!

Cheers,
Doug
cardi777
Forum Commoner
Posts: 54
Joined: Sun Mar 29, 2009 4:26 am

Re: no special charactors

Post by cardi777 »

cardi777 wrote:Hi all,

i have the expression that works well, but doesn't allow for spaces in the text. Does anyone know how I can fi this?

Code: Select all

/^[0-9a-zA-Z]+$/
I don't know regex well at all. Hoping its an easy one!

Cheers,
Doug
actually, forget it. I figured it out.

Code: Select all

/^[0-9a-zA-Z ]+$/
just added a space! woohoo
Post Reply