By Syabab on Tuesday, 31 January 2017
Replies 2
Likes 0
Views 2.8K
Votes 0
Hi,

I hope we can start share a collection of some regex for username here;

----------------------------------------------------------------

From: Title

Descriptions: Accept only alphanumeric values and hyphen, underscore or period (-/_/.). Start from alphanumeric character not a hyphen or underscore.

^[a-z][-_a-z0-9]*$
-----------------------------------------------------------------

Descriptions: It verifies that: - Only letters, numbers and period,hyphen & underscore are allowed - No two different symbols may follow each other - Cannot begin or end with a symbol,hyphen, underscore or dot.

Problem: No character limitation.

^((([A-Za-z0-9]+_)|([A-Za-z0-9]+\-)|([A-Za-z0-9]+\.))*([A-Za-z0-9])){5,15}$
-------------------------------------------------------------------


Hope u guys can add more options, thanks
Good job Syabab! Will move this into the tutorials section.
·
Tuesday, 31 January 2017 21:26
·
0 Likes
·
0 Votes
·
0 Comments
·
I want to create a regexp for Chinese phone number:

^1[3-9][0-9]{9}$

but it doesn't work! What I'm missing?
·
Friday, 26 April 2019 16:09
·
0 Likes
·
0 Votes
·
0 Comments
·
View Full Post