Page 1 of 1

Check if string is (a-Z 0-9 and -)

Posted: Sun Feb 25, 2007 12:41 pm
by psychotomus
i only want strings that containt z-z A-Z 0-9 and -

how can i do this?

Posted: Sun Feb 25, 2007 12:56 pm
by feyd
What have you tried?

Posted: Sun Feb 25, 2007 1:07 pm
by psychotomus
right now im using php. just looping threw characters and checking them

Posted: Sun Feb 25, 2007 1:09 pm
by Christopher
Do you want to check if it contains only those characters or filter out any characters but those you want?

Posted: Sun Feb 25, 2007 1:42 pm
by feyd
psychotomus wrote:right now im using php. just looping threw characters and checking them
I assumed that. What I am wanting to see is what have you tried to do so using a regular expression?

Posted: Sun Feb 25, 2007 2:36 pm
by psychotomus
I don't even know where to begin =(

Posted: Sun Feb 25, 2007 2:37 pm
by feyd
psychotomus wrote:I don't even know where to begin =(
Have you read the stickies in this section? How about other threads? The regular expression threads linked from Useful Posts?