![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
Help me to validate my RegEx code.
I want it to match all alphanumeric characters (digits and letters, uppercase and lowercase), spaces " ", underscores "_", dashes "-", and dots "." and it should be at least 3 characters long and not more than 32 characters long.
Would it be.. ^[A-Z0-9.-_]{3,32}+$ ^[A-Z0-9.-_]{3,32}$ ^[A-Za-z0-9.-_]{3,32}+$ ^[A-Za-z0-9\.\-_]{3,32}+$ Which one would be correct if any (I need it for vbulletin forms) ? Thank you in advance for the help. ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
No one? I have thought this was webmaster board.
![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
last bump
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking Banned
Industry Role:
Join Date: Apr 2001
Location: N.Y. -Long Island --
Posts: 122,992
|
1+1 =2
---- |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
E. none of the above
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Registered User
Join Date: Mar 2003
Posts: 73
|
I think #4 is the closest. I don't think the minus sign is a metacharacter, so you don't need to escape it. I also don't think you need the plus sign before the dollar sign. Thus I end up with:
^[A-Za-z0-9\.-_]{3,32}$ Good luck ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
ICQ:649699063
Industry Role:
Join Date: Mar 2003
Posts: 27,763
|
I don't know what you are talking about.
__________________
Send me an email: [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Totally Borked
Industry Role:
Join Date: Feb 2005
Posts: 6,284
|
Quote:
Of course it needs escaping ![]() ^[A-Za-z0-9\.\-_ ]{3,32}$ or shorter still ^[\w\.\-]{3,32}$ note with this though, \w as it's recognising word characters, will allow tabs and line breaks, not just white space.... if you don't want them, negate them: ^[\w\.\-^\t^\n]{3,32}$
__________________
![]() For coding work - hit me up on andy // borkedcoder // com (consider figuring out the email as test #1) All models are wrong, but some are useful. George E.P. Box. p202 |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Join Date: Mar 2008
Posts: 8,960
|
Quote:
![]()
__________________
| _TeenageDecadence - Young Board Naked Teens. |
| ____ NonNudeGirls - Female Puberty Photos. ____ | | _ HerSelfPics - The ORIGINAL exGF SelfPic site. __ | \.______ xPosing - Wife Photosharing site. _______./ |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Hmm
Industry Role:
Join Date: Sep 2005
Location: On an endless road around the world for rock and roll.
Posts: 12,642
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |