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


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?

$molform =~ s/[^a-zA-G0-9]//g;

Just eliminate the Hydrogen:

$molform =~ s/H\d*//g;

Replies are listed 'Best First'.
Re^5: How to avoid an alphabet and integer next to it in a string?
by piscean (Acolyte) on Mar 21, 2014 at 18:16 UTC
    It says Forbidden chars. No output at all!