Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re^5: REGEX omit dashes - simple but ...

by kennethk (Abbot)
on Apr 04, 2016 at 17:28 UTC ( [id://1159520]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    if ($line =~ s/^\s*ACCESSION\s*NUMBER:\s*/) {
        $line =~ tr/-//;
    }
    
  2. or download this
    if ($line =~ s/^\s*ACCESSION\s*NUMBER:\s*([-\d]+)$/m) {
        $access_num = $1; 
        $access_num =~ tr/-//;
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (3)
As of 2025-01-14 17:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which URL do you most often use to access this site?












    Results (43 votes). Check out past polls.