简体   繁体   中英

Regular Expression for at least one alphanumeric or digit

I need to identify a string contain at least one character or digit and it may contain special character too

@#$@$#@$ --- false

@#$@$#@$1 --- true

@#$@$#@$w --- true

@#$@$#@$R --- true

下面的模式应该适合你

[\d\w]  or [a-zA-Z0-9]

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM