Regular Expression Opposite

前端 未结 7 995
悲&欢浪女
悲&欢浪女 2020-11-28 07:55

Is it possible to write a regex that returns the converse of a desired result? Regexes are usually inclusive - finding matches. I want to be able to transform a regex into

7条回答
  •  甜味超标
    2020-11-28 08:02

    You can also do this (in python) by using re.split, and splitting based on your regular expression, thus returning all the parts that don't match the regex, how to find the converse of a regex

提交回复
热议问题