Unable to use regex for custom inspection

Hello.

 

I 'm trying to detect a HTML attribute in specific conditions :

The attribute 'data-target' is present AND the class contains 'ajaxLink' AND the tag is 'a'.

So <a href="..." class="ajaxLink" data-target="...">aaa</a> should trigger the inspector.

 

heres what I tried :

<$tag$ $deprecated$ />

 

tag : text/regexp = 'a'

deprecated: text/regexp = '/^(?=.*\bdata-target\b)(?=.*\bajaxLink).*$'

 

And this don't work.. Can you help Help me?

 

Thanks a lot for your help ! :)

2 comments

what about

<$tag$ $attribute$ $attribute1$=$value$ />

where tag is a

        attribute   is  data-target

        attribute1  is  class

and value  is  .*\bajaxLink

1

Thanks a lot it works perfectly ! :)

0

Please sign in to leave a comment.