View Single Post
Old 09-25-2017, 05:30 AM   #4
Tex2002ans
Wizard
Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.Tex2002ans ought to be getting tired of karma fortunes by now.
 
Posts: 2,306
Karma: 13057279
Join Date: Jul 2012
Device: Kobo Forma, Nook
Parentheses are a special character in Regular Expressions, so if you want to actually find them in the text, you have to remember to "escape" them by using a backslash.

If you look at davidfor's answer, you can see the correct backslashes in ORANGE:

\(([0-9]+:[0-9]+)\)

... and the reason why parentheses are special in Regex is your inner portion. Parentheses allow you to "capture" text.

\(([0-9]+:[0-9]+)\)

Whatever is in between those special RED parentheses gets "captured" in a group. So, in this case, all the BLUE stuff becomes "Group 1".

Now, if you take a look at your Replace:

<b><sup>\1</b></sup>

The BLUE "\1" says "stick Group 1" here.
Tex2002ans is offline   Reply With Quote