I'm trying to figure out how to select a specific part of text in HTML and convert it to uppercase using regexp in Sublime Text. An example of HTML that I have:
<p><b>Lorem ipsum / Dolor Sit Amet -- consectetur -- adipiscing</b><br> [...]
<p><b>elit -- "sed" -- do -- eiusmod</b><br> [...]
<p><b>Tempor, Incididunt & ut labore -- "et" -- dolore -- magna</b><br> [...]
I need to select everything between the tags <p><b>
and the first appearance of --
and convert it to uppercase, like this:
<p><b>LOREM IPSUM / DOLOR SIT AMET -- consectetur -- adipiscing</b><br> [...]
<p><b>ELIT -- "sed" -- do -- eiusmod</b><br> [...]
<p><b>TEMPOR, INCIDIDUNT & UT LABORE -- "et" -- dolore -- magna</b><br> [...]
Could you please help me to solve this? I'm new to regexp and still don't really understand it's complexity... Thanks!
\K[^<>]*?--` and replace with `\U$0`
– Wiktor Stribiżew Aug 26 '18 at 11:49