Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
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 making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2014-10-02 03:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (46 votes), past polls