Home > Q&A > body text
/^[\s\u3000]*|[\s\u3000]*$/
typecho2017-06-12 09:27:22
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
s
u3000
^[su3000]*
[su3000]*$
大家讲道理2017-06-12 09:27:22
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