Lets say i want to write a regular expression to replace the word Dog
with the word Cat
.
e.g.
Dogs are scary.
will become:
Cats are scary.
But i want this regex to be applied only if the word Dog is not inside a quote.
e.g.
Dogs are scary but my mom told me that "Dogs are cute"
will become:
Cats are scary but my mom told me that "Dogs are cute"
I have no idea how to do it. Help me please :)