Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^4: How to avoid an alphabet and integer next to it in a string?

by runrig (Abbot)
on Mar 21, 2014 at 18:08 UTC ( #1079319=note: print w/ replies, xml ) Need Help??


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;


Comment on Re^4: How to avoid an alphabet and integer next to it in a string?
Select or Download Code
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!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1079319]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2014-09-21 00:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (165 votes), past polls