I have a whole project full of Scrivener documents that I need to run
through a simple(ish) conversion. I want to change the single quotes
into double quotes.
Best I could come up with was a two stage process:
Convert the single quotes to doubles (which will also convert the
apostrophes in !'m and didn't etc.)
Next run a regex over it:
Find ([^ \n)"([^ \n])
Replace with \1'\2
The problem is that the replace for the apostrophes isn't working.
Rather than doing the group replacement, it's just replacing the
everything with \1'\2. I thought substitution was supported, so I'm
not sure what I'm doing wrong.
Any help would be very much appreciated.
Thanks.
Second, you could do something like
Find: (\w)(')(\w)
Replace: $1’$3 { that's a curly apostrophe }
Find: '
Replace: "
Find: ’ { that's a curly apostrophe }
Replace: '
Effectively replacing any single quote surrounded by word letters on
both sides to a curly apostrophe, covert your single quotes to double
quotes, finally find the curly apostrophe and convert it back to a
straight apostrophe.
This does make the assumption that you would not embedded quotes
within a word. That would be considered the most common situation as
most people would not'quote'text like this. But this will fail if you
use things like 'cause hangin' etc. Because these are really
exceptions, it's easier to special case them. Use the bulk find and
replace action to find those words after the conversion in their new
form: "cause hangin" or replace them beforehand with the standard
words.
> --
> You received this message because you are subscribed to the Google Groups "TextSoap" group.
> To post to this group, send email to text...@googlegroups.com.
> To unsubscribe from this group, send email to textsoap+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/textsoap?hl=en.
>
--
Mark Munz
unmarked software
http://www.unmarked.com/