From a previous question I have this nice regular expression:
\[.*\]\((?!http)(?!.+\.md).+\)
It matches all internal Markdown links that do not have a .md
file extension. You can see some matches of it here: https://regex101.com/r/0uW1cl/6
This regex works just fine in an opened file via Edit -> Find (or Ctrl + F) when I enable "Use Regular Expression" in the find input field.
But it does not work in the Edit -> Find in Files functionality:
As you can see on the screenshot it gives me this nice error message:
Error parsing regex near `]\((?!http' at character offset 9: Unrecognized flag: '!'. (Allowed flags: i, m, s, U, u, x.) Blockquote
As far as I know those use the same code behind the scenes to execute regular expression searches.
Why does it work in "Find", but not "Find in Files"?
Is there a way to fix this or a workaround?
(For now I am using Notepad++ which seems to handle this regex fine, but of course I would prefer to keep working in VS Code)