否定正则表达式的匹配结果
Negate matched results of regex expression
我想提出一个正则表达式来否定正则表达式的匹配结果:.google.*search
。并且,是否可以使用我试图否定的正则表达式中的正则表达式来实现它?
测试数据
[1] https://www.google.com/search?newwindow=1&sxsrf=ALeKk02MzEfbUp3jO4Np
[2] https://github.com/redis/redis-rb
[3] https://web.whatsapp.com/
预期结果
第 2、3 行匹配正则表达式模式,是结果的一部分。
我想提出一个正则表达式来否定正则表达式的匹配结果:.google.*search
。并且,是否可以使用我试图否定的正则表达式中的正则表达式来实现它?
测试数据
[1] https://www.google.com/search?newwindow=1&sxsrf=ALeKk02MzEfbUp3jO4Np
[2] https://github.com/redis/redis-rb
[3] https://web.whatsapp.com/
预期结果
第 2、3 行匹配正则表达式模式,是结果的一部分。