正则表达式属性方法

----------------------------------------------------------------------------------------------------------------------------------------

方法:regexp.test(str):

           testf方法的lastIndex的值:当前匹配结果的最后一个字符的下一个字符,

           如果用test方法,就不要用g,就不会因为lastIndex导致问题

----------------------------------------------------------------------------------------------------------------------------------------

方法match():

----------------------------------------------------------------------------------------------------------------------------------------

方法search():

----------------------------------------------------------------------------------------------------------------------------------------

方法split():

----------------------------------------------------------------------------------------------------------------------------------------

方法replace():

发布了234 篇原创文章 · 获赞 24 · 访问量 29万+

猜你喜欢

转载自blog.csdn.net/aliven1/article/details/103645468