Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

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

by kennethk (Abbot)
on Apr 04, 2016 at 17:28 UTC ( #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 wandering the Monastery: (2)
As of 2023-12-08 16:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?











    Results (36 votes). Check out past polls.

    Notices?