Hey guys, sorry if this isn't the correct area for this.
Basically, I am trying to write a method that will take a string, a target, and a replacement (a replacement function like string.replace). I want it to replace all instances of target with replacement EXCEPT for instances that occur within single or double quotes.
Example input / output:
this "Wont" be " replaced, be"
call: replace(theString, "replaced", "narf") and replace(theString, "be", "rafn")
this "Wont" rafn " replaced, be"
Can this be done moderately easily?
I am working on it but haven't gotten far yet...