in reply to Re^7: 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?
Although hazylife may have nailed the problem...you need to learn how to provide useful debugging information.my $molform = <STDIN>; print "Molform before: [$molform]\n"; s/\s+$//, s/H(?![a-z])\d*//g for $molform; print "Molform after: [$molform]\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^9: How to avoid an alphabet and integer next to it in a string?
by piscean (Acolyte) on Mar 21, 2014 at 19:40 UTC |