Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 regex and wildcards in user name
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 July 2009 :  06:37:03  Show Profile  Visit Etymon's Homepage  Reply with Quote
You know how wildcards are not allowed in the username such below?

* You may not use any of these chars in your username !#$%^&*()=+{}[]|\;:/?>,<'

Is there a regex expression that will do the same thing? The regex expressions I find still allow certain wildcards like #%+

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 13 July 2009 :  06:47:48  Show Profile  Visit HuwR's Homepage  Reply with Quote
what exactly did you want the regex to do ?
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 13 July 2009 :  10:59:39  Show Profile  Visit Etymon's Homepage  Reply with Quote
I'm trying to pre-filter member names using auto-complete with jQuery.
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  00:15:07  Show Profile  Visit Etymon's Homepage  Reply with Quote
Well, I am having a little bit of trouble still finding the regex I would like to use.

I did find something that prevents characters from being entered which is actually better, but, alas, I don't know how it is done.

Would someone mind taking a look at the first text box on this page (http://www.ajaxcontroltoolkit.com/FilteredTextBox/FilteredTextBox.aspx) where it says Only digits are allowed here:? Try typing in anything other than a number, and you will see what I am talking about. The character is rejected and cleared before it is accepted. I'd like to do that with this combination:

alphanumeric space underscore

Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  02:44:54  Show Profile  Visit Etymon's Homepage  Reply with Quote
I found this: http:// .internet.com/forms/val-num-or-char.html

Though it's not as clean as the one I was asking about, it will work for now.

Edited by - Etymon on 15 July 2009 02:45:28
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  02:46:42  Show Profile  Visit Etymon's Homepage  Reply with Quote
Well, that is interesting.

The link above is supposed to look something like this (the area in red should have been included in the link above):

http://javascript.internet.com/forms/val-num-or-char.html

Edited by - Etymon on 15 July 2009 02:51:53
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  02:49:46  Show Profile  Visit Etymon's Homepage  Reply with Quote
OK, this works when posted directly:

http://javascript.internet.com/forms/val-num-or-char.html

And this does not work when posted using the [ url ] [ /url ] tags:

http:// .internet.com/forms/val-num-or-char.html

Rui? HuwR? Guys?

Edited by - Etymon on 15 July 2009 02:52:31
Go to Top of Page

Carefree
Advanced Member

Philippines
4207 Posts

Posted - 15 July 2009 :  10:15:28  Show Profile  Reply with Quote
quote:
Originally posted by Etymon

OK, this works when posted directly:

http://javascript.internet.com/forms/val-num-or-char.html

And this does not work when posted using the [ url ] [ /url ] tags:

http:// .internet.com/forms/val-num-or-char.html

Rui? HuwR? Guys?



Go look at the bugs forum. I posted a fix to that last year.
Go to Top of Page

HuwR
Forum Admin

United Kingdom
20584 Posts

Posted - 15 July 2009 :  10:18:54  Show Profile  Visit HuwR's Homepage  Reply with Quote
some of the characters you are trying to reject won't work in a regex as they are special control characters used by regex itself, which may be why you are having a problem.

the word javascript is being filtered out of the url by the forum code (this was deliberate)
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  12:23:09  Show Profile  Visit Etymon's Homepage  Reply with Quote
Ah! Yes, the regex is interesting. I found a javascript to help out with that.

The link thing. I shoulda' looked before I leaked on that. Thanks Huw! Thanks Carefree!
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 15 July 2009 :  12:40:17  Show Profile  Visit SiSL's Homepage  Reply with Quote
Remember, Javascript \s or \S might filter out non-English characters as well.

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 15 July 2009 :  13:15:25  Show Profile  Visit Etymon's Homepage  Reply with Quote
I saw that. I think it works for allowing a space. Well, the lowercase representation \s

Thank you SiSL!
Go to Top of Page

SiSL
Average Member

Turkey
671 Posts

Posted - 15 July 2009 :  14:00:09  Show Profile  Visit SiSL's Homepage  Reply with Quote
quote:
Originally posted by Etymon

I saw that. I think it works for allowing a space. Well, the lowercase representation \s

Thank you SiSL!



No problem, since I'm having a non-English forum with additional letters like dotless i or cedilla, I had problems about that and wanted to share experience...

CHIP Online Forum

My Mods
Select All Code | Fix a vulnerability for your private messages | Avatar Categories W/ Avatar Gallery Mod | Complaint Manager
Admin Level Revisited | Merge Forums | No More Nested Quotes Mod
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 July 2009 :  04:42:44  Show Profile  Reply with Quote
If you're just starting out with regular expressions, this is a fantastic site for learning and this is a great piece of software for testing.


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

Etymon
Advanced Member

United States
2385 Posts

Posted - 16 July 2009 :  19:35:59  Show Profile  Visit Etymon's Homepage  Reply with Quote
Hey! Thank you Shaggy!
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 17 July 2009 :  04:50:15  Show Profile  Reply with Quote
You're welcome, dude


Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.12 seconds. Powered By: Snitz Forums 2000 Version 3.4.07