Quote:
Originally Posted by Mister L
I want to find sets of em dashes with some text between them that are in the *same sentence*. So the text between the em dashes cannot include .!? but can include ,;: for example.
|
Did you mean sets of EN dashes instead? (Like your examples use?)
Something like this might work:
Find: –(\w*[^\.\?!]+?)–
Replace: —\1—
That would replace the en dashes with em dashes, and stick the captured "non-sentence" back in the middle.
I didn't do thorough testing though, so it probably would break in a lot of edge cases, but it did work correctly on your examples.