Regex: search from variants, but search by variant first, not by searcgin string

前端 未结 0 2011
既然无缘
既然无缘 2021-01-21 02:52

For example, we have \'1+2-3\'. And we need to catch symbols [-|+]

\'1+2-3\'.match(/-|+/)

returns +, as it trace by string first; how to find \'-

相关标签:
回答
  • 消灭零回复
提交回复
热议问题