Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

regexp and substitute operator problem

by dannoura (Pilgrim)
on Jul 08, 2003 at 05:59 UTC ( [id://272204]=perlquestion: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $c='[\d\-\.pqxy]'; #regexp
    (@chroms)=($text=~/\s$c*?\s/sig); #extract all
    for ($i=0; $i<@chroms; $i++) {
    splice(@chroms, $i, 1) if (!($chroms[$i]=~/[pqxy]/i));
    } #eliminate pure numbers
    print "$_\n" foreach (@chroms);
    
  2. or download this
    Xq27-q28
    q11q12
    22q121
    ...
    52
    15
    19q12q1311
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://272204]
Approved by BrowserUk
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others sharing their wisdom with the Monastery: (5)
As of 2024-04-19 12:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found