I am trying to find files that don't contain string in the project finder of sublime.
I tried: ^((?!string))*$ but it returns all files that include the string. Any way to get this to work?
I have a bunch of svg files (>400) and and they should all have a class called icons-background in them somewhere. Now I just want to find the svg files that don't have that class and fix them.
<svg viewBox="0 0 32 32">
<path fill="#20262d" d="M23.8 0c3.5 6.4 4.2 16-9.8"></path>
</svg>
<svg viewBox="0 0 32 32">
<path fill="#20262d" class="icons-background" d="M23.8 0c3.5 6.4 4.2 16-9.8"></path>
</svg>

What I ended up using is a bash command:
find . -type f -wholename "*/svg/*.svg" -not -path "*/node_modules/*" -exec grep -L -H 'icons-background' '{}' ';'
I keep this question open however in case someone finds a solution for one of those editors.
Try this:
^((?!class="icons-background").)*$
You can explore this regex using the link below:
Regex101
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With