Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Regex fun

by JadeNB (Chaplain)
on Dec 15, 2009 at 17:58 UTC ( [id://812913]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    while (m/\+([0-9]+)[ACGTNacgtn]/g) { 
      print "diff+: $1\n";
      my $m = $1;
      s/\+[0-9]+[ACGTNacgtn]{$m}// 
    }
    
  2. or download this
    s/\G\+$1[$bases]{$1}// while /(?=\+([0-9]+))/g;
    
  3. or download this
    1 while s/(?<=\+)([0-9]+)[$bases]/$1 - 1/eg;
    
  4. or download this
    1 while s/\+([0-9]+)[aAgGcC]/$1 > 1 ? '+' . $1 - 1 : ''/eg;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-04-25 23:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found