The Problem with s/H\d*//g is that it will also remove the H from HgS (ok,, not organic chemistry, but you get the point).
One way to avoid that is to use a negative look-ahead:
s/H(?![a-z])\d*//</c> <p>Or if you prefer the Unicode-y approach:</p> <code>s/H(?!\p{Ll})\d*//
In reply to Re^4: How to avoid an alphabet and integer next to it in a string?
by moritz
in thread How to avoid an alphabet and integer next to it in a string?
by piscean
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |