javascript - What does js regular match match?
欧阳克
欧阳克 2017-06-12 09:25:22
0
3
589
/^[\s\u3000]*|[\s\u3000]*$/
欧阳克
欧阳克

温故而知新,可以为师矣。 博客:www.ouyangke.com

reply all(3)
typecho

s means English space, u3000 means Chinese space
^[su3000]* matches the beginning of a space, [su3000]*$ matches if there is a space at the end, Wu Ke is right

大家讲道理

Match Chinese and English spaces at the beginning or end of the line

大家讲道理

Match half-width and full-width spaces before and after a string

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template