What is the proper regular expression for an unescaped backslash before a character?

前端 未结 4 870
刺人心
刺人心 2020-12-31 11:18

Let\'s say I want to represent \\q (or any other particular \"backslash-escaped character\"). That is, I want to match \\q but not \\\\q

4条回答
  •  爱一瞬间的悲伤
    2020-12-31 11:51

    Now You Have Two Problems.

    Just write a simple parser. If the regex ties your head up in knots now, just wait a month.

提交回复
热议问题