http://www.perlmonks.org?node_id=1079339


in reply to Re: 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?

As runrig suggests below the more general s/H\d*//g; may be more appropriate to your needs.

It does help, but what about Hg element? When I enter Hg, it gives me zero as output.

  • Comment on Re^2: How to avoid an alphabet and integer next to it in a string?