How to place tags around a number

How to place tags around a number

2

    Feb 01, 2005#1

    Hi,

    If someone could help me with this RE, I'd really appreciate it.

    I have a bunch of chemical symbols, e.g. H2O, and I want to subscript their numbers, e.g. H<sub>2</sub>O using search and replace.

    The problem is how to reference the number (in this example, 2) in the replace field. If it were always a 2, that would be easy. But it could be any number.


    Thanks in advance.

    46
    Basic UserBasic User
    46

      Feb 02, 2005#2

      You can use regular expression to do that (check regular expression
      in the replace dialog). This one could be fine (UltraEdit style):

      "^([0-9]+^)"

      replace with:

      "<sub>^1</sub>"

      That it's.

      Regards,
      Alain
      Never forget: "Above the clouds, The sky is blue and the sun shine"

      2

        Feb 02, 2005#3

        Ah ha! Thanks, Palou!