I want to find and replace part of a field for all the cards in a deck. I am getting an error message that my regex is invalid. I’ve tested the regex in Sublime Text and it works there. I’m not sure why it’s invalid. I tried three regexs which work in other places, but not in Anki find and replace.
A[^`]+B
A(?s).+B
A(?:.|\s)+B
Does anyone know why it’s invalid?
All I need is to replace everything from word A to word B (there may be one or more newlines between the two words). If you know of another way I can do that, please let me know.
The regexes work for me. Maybe you have some special characters in A or B like \ that need escaping? You can post the full example that causes the issue.