Regex Error: Nothing to Repeat

前端 未结 3 884
北海茫月
北海茫月 2021-01-26 08:50

I\'m new to regular expressions in JavaScript, and I cannot get a regex to work. The error is:

Uncaught SyntaxError: Invalid regular expression: /(.

3条回答
  •  迷失自我
    2021-01-26 09:31

    Try this, it will seperate the left hand side and the right hand side:

    (.*x.*)=(.+)
    

    Live demo

提交回复
热议问题