Regular expression: you can enter numbers, English case, and underscores, but the sliding line can only be 0 or 1, and the total length is in the range of [2JI 32].

I just can"t deal with the underscore 0 or 1 and the length!

Mar.24,2021

^(?=[^_]*_?[^_]*$)[\da-zA-Z_]{2,32}$
^(?!.*_.*_)[\da-zA-Z_]{2,32}$

if the language you use,\ w does not match Chinese, you can write

like this.
^(?=[^_]*_?[^_]*$)\w{2,32}$
^(?!.*_.*_)\w{2,32}$
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e51c41-4515a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e51c41-4515a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?