Css 样式Lint:带有正则表达式的最大特异性选择器

Css 样式Lint:带有正则表达式的最大特异性选择器,css,regex,stylelint,Css,Regex,Stylelint,我有一个问题的风格皮棉。我已将选择器的最大特异性设置为0,2,0,并忽略了一些规则:ignoreSelectors:[“:focus”、“:hover”等] 现在,我想忽略:not(.myClass)选择器,但这不起作用:( 例如,我的类的名称是:。track a:not(.track visual) 我尝试过使用regex选择器“/:not\\\(.\\)/”,甚至使用“/.*:not\\\(.\\)/” 但是没有机会:'( 如果您有解决方案,我感兴趣:) 谢谢你我猜在这里我们希望用:not来

我有一个问题的风格皮棉。我已将选择器的最大特异性设置为0,2,0,并忽略了一些规则:
ignoreSelectors:[“:focus”、“:hover”等]

现在,我想忽略
:not(.myClass)
选择器,但这不起作用:(

例如,我的类的名称是:
。track a:not(.track visual)

我尝试过使用regex选择器
“/:not\\\(.\\)/”
,甚至使用
“/.*:not\\\(.\\)/”

但是没有机会:'(

如果您有解决方案,我感兴趣:)
谢谢你

我猜在这里我们希望用
:not
来捕捉那些,在这种情况下,我们将从一个简单的表达式开始,例如:

.+?:not\(.+?\)
正则表达式电路 可视化正则表达式:


不要认为这是可以做到的。这包括以下几点:

const ownSpecificity =
    ownValue === ':not' || ownValue === ':matches'
        ? // :not and :matches don't add specificity themselves, but their children do
          zeroSpecificity()
        : simpleSpecificity(ownValue);

根据评论,这不包括
:不包括
本身,因为这会增加特殊性,但包括其子项,这是正则表达式将检查的内容。

感谢您的回复,我已经测试了您的解决方案,但这不起作用:'(我不明白为什么,因为例如,如果我想忽略选择器属性,这是一个很好的方法:
/\[.*\]/