Thread: Regex examples
View Single Post
Old 06-22-2020, 03:53 PM   #649
Mister L
Groupie
Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.Mister L is the 'tall, dark, handsome stranger' all the fortune-tellers are referring to.
 
Posts: 179
Karma: 91148
Join Date: Jun 2010
Device: Sony 350
Quote:
Originally Posted by Doitsu View Post
That's not the result that I'm getting. With:

Find:<span class="Cap">(.)</span><span class="SmallCap">(.*?)</span>
Replace:\1\L\2\E


I'm getting:

First word of the sentence is always capitalised, Other Wwords in the sentence may or may not be capitalised

(None of the Regex options are checked.) You'll need to uncheck the Minimal Match option.
Oh, it works if I uncheck Minimal Match! That's the exact opposite of what I would have expected, to be honest... I would expect "minimal match" to make it select the smallest amount of text possible to match the pattern but apparently not. Do you know why it does not work that way, at least in this case?

Well thanks very much for that tip, in future I will experiment more with minimal match and see when it is helpful and when not.
Mister L is offline   Reply With Quote