Please enable JavaScript to use regex101
/
^
r
e
g
e
x
[
\
-
_
]
?
1
0
1
$
/
i
Regular
Expressions
101
Regular
Expressions
101
Upgrade to Pro
Enterprise
Regular Expression
/
#(\w*[0-9a-zA-Z]+\w*[0-9a-zA-Z])
/
g
Input 1
1
New
//only accept az AZ and _ (underscore) #teste_teste //underscore accepted #teste-teste //Hyphen not accepted #leof_gfg.sdfsd //dot not accepted #f34234@45#6fgh6 // @ not accepted #leo#leo2#asd //followed hastag without space #6663 // only number accepted _#asd_ // hashtag can't start or finish with underscore -#sdfsdf- // hashtag can't start or finish with hyphen .#sdfsdf. // hashtag can't start or finish with dot #leo_leo__leo__leo____leo //TO FIX: decline followed underline
Substitution