View Single Post
Old 07-27-2020, 08:45 PM   #2
DNSB
Bibliophagist
DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.DNSB ought to be getting tired of karma fortunes by now.
 
DNSB's Avatar
 
Posts: 46,410
Karma: 169098492
Join Date: Jul 2010
Location: Vancouver
Device: Kobo Sage, Libra Colour, Lenovo M8 FHD, Paperwhite 4, Tolino epos
Quote:
Originally Posted by Ted Friesen View Post
Using this search: <p><b>([A-Z]+\s[A-Z]+)+</b></p>

the following string was found and the entire string was highlighted
<p><b>MEDICATIONS THAT CAUSE WEIGHT GAIN</b></p>

but applying this replace: <h4>\1</h4>

I got the following truncated result <h4>T GAIN</h4>

What I was hoping to do was to find all occurrences of
<p><b>ONLY WORDS IN CAPS</b></p>, regardless of the number of words and replace it with <h4>ONLY WORDS IN CAPS</h4>. Looking to capture strings of two or more words.
Perhaps if you edited your search string to allow white space as an allowed character?
Code:
<p><b>([A-Z\s]+)+</b></p>
DNSB is offline   Reply With Quote