Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 studying the Monastery: (7)
As of 2014-12-29 00:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (183 votes), past polls