Question about regex

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

Moderator: General Moderators

Post Reply
jasejunk
Forum Newbie
Posts: 6
Joined: Tue Jul 07, 2009 6:24 pm

Question about regex

Post by jasejunk »

Hey all. I'm looking to make a script that can check if a string is either 3-18 characters with no symbols or if it's 6-35 characters in email form.

If any know how to do this, please let me know.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Re: Question about regex

Post by Christopher »

You should be able to find patterns to match alphanum and email. If one of those checks pass, then use strlen() to check the length.
(#10850)
jasejunk
Forum Newbie
Posts: 6
Joined: Tue Jul 07, 2009 6:24 pm

Re: Question about regex

Post by jasejunk »

I want it to be able to check if one of those forms fits either of the condition sets.
Post Reply