Perl Regex:匹配这个组,但没有这个模式
Perl Regex: Match this group, but not having this pattern
我需要提取一些以双引号开头和结尾的文本 "
但如果它检测到多个双引号则不会提取。
我尝试使用不同的 look-arounds,positive/negative look-aheads 和 look-behinds,但它会导致错误。
在我上面的示例中,我想排除数据
"XxXXXXX - "" """"XX""""""",
和
"XxXXXXX - ""XXXXX XXXXXXXX 1.4.90 """"X2""""""",
免于匹配。
我在这里看到了其他一些答案,但是每当我使用负向后视时,我都会收到错误消息,正向前视和负向前视都没有问题,但它不起作用。
Edit:
I've added some examples regex in the link provided, and also more example data.
However, I still don't want to match data above by the current regex.
我需要提取一些以双引号开头和结尾的文本 "
但如果它检测到多个双引号则不会提取。
我尝试使用不同的 look-arounds,positive/negative look-aheads 和 look-behinds,但它会导致错误。
在我上面的示例中,我想排除数据
"XxXXXXX - "" """"XX""""""",
和
"XxXXXXX - ""XXXXX XXXXXXXX 1.4.90 """"X2""""""",
免于匹配。
我在这里看到了其他一些答案,但是每当我使用负向后视时,我都会收到错误消息,正向前视和负向前视都没有问题,但它不起作用。
Edit:
I've added some examples regex in the link provided, and also more example data. However, I still don't want to match data above by the current regex.