Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: help with regex

by hdb (Monsignor)
on Mar 20, 2019 at 08:16 UTC ( #1231479=note: print w/replies, xml ) Need Help??


in reply to help with regex

split can also capture. So if you want all the pieces, the G-strings and the other bits, it could work like this

use strict; use warnings; my $line = "GGCTTTCCGTTGTTGCTGGGTGTGGGGGGCGGGCGAGATTGGAAGAGCACACGTCTGA +ACTCCAGTCACGCCAATATCTCGTATGCCGTCTTCTGCTTGAAAAAAGGGGTGGGGGGGAGGGGGGGCG +GGGGGGGGGGGGGGAGGGGGGGAG"; my @pieces = split /(G{10,})/, $line; print "$_\n" for @pieces;

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (4)
As of 2021-04-23 08:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?