View Single Post
 
Old 08-05-2020, 05:25 AM
John 4 John 4 is offline Windows 10 Office 2016
Advanced Beginner
 
Join Date: Oct 2019
Posts: 69
John 4 is on a distinguished road
Default

Thanks for your suggestion Andrew. Auto-format can probably be very useful but I doubt that it has the flexibility of knowing how to use find and replace properly. It (find and replace) is an amazing tool and I'd like to be able to use it to it's full potential (or somewhere close to it).

The Wiki articles sub-headings is really only one of numerous similar problems that I often encounter while trying to manipulate documents, so if I could find the answer to this question (if there is an answer), then it would answer a number of other problems I have as well, whereas I think auto-format would be a bit one-dimensional by comparison.

It's the asterisk that is both so useful and at the same time causes so many problems.

For example, I often want to use a quotation as a dividing marker in my "Find" searches. If i want to italicise all quotes it works great: Find: "*" and Replace with: Italics. If i click "Find next" it will skip from one quotation to another perfectly. But if introduce anything else into the "Find", then things can get messy. E.g. the quotes are often followed by a bracketed reference for the quote, but if I try to include the reference in my search then the "*" starts finding lots of text I don't want it to find. It no longer limits itself to one quote and instead starts selecting numerous quotes including lots of unquoted text in between.

I've tried using "*"{1} to limit it to one quote, and also things like "{1}*" hoping that it would limit itself to only one 'open speech marks', but of course the asterisk overrides any limits I try to impose.

I have had some success with codes like the following:
([A-Za-z ,.;:’\?\!\-”]{10,200})
It will select most characters except "open speech marks" (between 10 and 200 characters as you can see), which of course has the effect of (usually) limiting the search to one quotation (minus the "open speech marks" which ideally would be included). That then often requires some extra fixing up afterwards which i was hoping I could avoid if I could find some way to "tame" the asterisk.

Sorry to take up your time. But if you have any suggestions I'd be happy to hear them. I suspect knowing how to write macros would help a lot, but i also suspect that would take quite some effort.

Thanks again
Reply With Quote