Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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
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 chanting in the Monastery: (2)
As of 2021-05-09 22:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (102 votes). Check out past polls.

    Notices?