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}$
Menu