Bulk replace all instances of CO2 with CO<sub>2</sub>

Is it possible to bulk replace all instances of the carbon dioxide molecule notation CO2 with the proper notation (subscript 2)?

Open the full Search&Replace tool (Ctrl H) and enable “Regular expressions” under “other options.” In “Find” write

(?<=CO)2

and click “select all:” all the “2” after a CO will be selected. Alt Tab to go to the document and now you can apply the formatting to all those “2” either as direct formatting (Ctrl Shift B) or by applying a character style.

…and Replace all: with .