in reply to Re^3: How to avoid an alphabet and integer next to it in a string?
in thread How to avoid an alphabet and integer next to it in a string?
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 Section
Seekers of Perl Wisdom