I am performing a grep find and replace in my text editor TextWrangler on a very large CSV data file.
I have a source string of
hello??world ??goodnight?? moon?? wake up
and would like to replace the ?? substring with -- ONLY when it is bounded by non-whitespace characters on both sides, yielding a target string of
hello--world ??goodnight?? moon?? wake up
I have tried the following regex:
with the replace operation
but the ?? within ??goodnight?? and moon?? are still being matched even though they are both bordered by whitespace on one side.