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;
In Section
Seekers of Perl Wisdom