[removed] negative lookbehind equivalent?

前端 未结 12 1515
南旧
南旧 2020-11-21 05:47

Is there a way to achieve the equivalent of a negative lookbehind in javascript regular expressions? I need to match a string that does not start with a specific set of cha

12条回答
  •  野性不改
    2020-11-21 06:24

    You could define a non-capturing group by negating your character set:

    (?:[^a-g])m
    

    ...which would match every m NOT preceded by any of those letters.

提交回复
热议问题