View Single Post
 
Old 08-05-2020, 06:54 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

In case anyone else has a similar problem to the bolding of the Wikipedia subheadings - here's a code that will take care of almost all of them and remove the "[edit]":

Find: ([A-Za-z ,.;:’\?0-9\!\-”\(\)]{3,200})(\[edit\])
Replace: ^13\1
(Bold)

I added a paragraph mark because many of the subheadings don't have one before them when you paste the article in plain text. But some of them do, in which case you'll sometimes have 3 paragraph marks when you only want two. So to reduce them to two, and unbold them, and change all the ^13 to proper paragraph marks (^p) that don't cause any issues, use:

Find:^13^13^13
Replace:^p^p
(Not Bold)

So that's the Wikipedia problem pretty much sorted. But like I said in the previous post - this wasn't really about Wikipedia articles anyway, it's more about finding a way to limit the asterisk which causes me so many other problems. If anyone can answer that I'd be glad.

Edit: In case anyone's wondering why I didn't use this before - I had been trying to limit the selection to the subheading by using the paragraph mark that comes before it, but know I've realised that by not using the asterisk the selection won't go beyond/before the beginning of the sub-heading. The asterisk of course includes all characters including paragraph marks, which is why it was selecting lots of text that preceded the subheading.

...We're all still learning. Sigh.

Last edited by John 4; 08-05-2020 at 10:54 AM.
Reply With Quote