As far as I can tell there is only one string that is between a G(...)and 10+ more G's.
Update: shortened the very long string so it displays better.
Your question is not clear. Your code is not right.
Given the string: "GGCTTTCCGTTGTTGCTGGGTGTGGGGGGCGGGCGAGATTGGAAGAGCACA +CGTCTGAACTCCAGTCACG". "CCAATATCTCGTATGCCGTCTTCTGCTTGAAAAAAGGGGTGGGGGGGAGGGGGGGCGGGGGGGGGGGGG +GGAGGGGGGGAG", please explain in english what you want to accomplish. + I have no idea what this means
Update:
is this what you want?
#!/usr/bin/perl use strict; use warnings; while (my $line=<DATA>) { chomp $line; my @array = $line =~ /(ACTCCAGTCACGCCAATATCTCGTAT)(.+?)(?:G{10,})/ +g; print join ("\n", @array),"\n"; #prints "ACTCCAGTCACGCCAATATCTCGTAT" # "GCCGTCTTCTGCTTGAAAAAAGGGGTGGGGGGGAGGGGGGGC" -> stuff befo +re 10 or more G's } __DATA__ GGCTTTCCGTTGTTGCTGGGTGTGGGGGGCGGGCGAGATTGGAAGAGCACACGTCTGAACTCCAGTCACG +CCAATATCTCGTATGCCGTCTTCTGCTTGAAAAAAGGGGTGGGGGGGAGGGGGGGCGGGGGGGGGGGGG +GGAGGGGGGGAG
In reply to Re: help with regex
by Marshall
in thread help with regex
by rnaeye
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |