js 去掉前后空格(正则表达式方法)

  • 代码:
'  aaa '.replace(/(^s*)|(s*$)/g, '')
原文地址:https://www.cnblogs.com/cag2050/p/8808909.html