Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: Regex fun

by JadeNB (Chaplain)
on Dec 15, 2009 at 17:58 UTC ( #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? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2023-03-21 19:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Which type of climate do you prefer to live in?






    Results (60 votes). Check out past polls.

    Notices?