matth has asked for the wisdom of the Perl Monks concerning the following question:
There is a problem with the regexp:
if ($line =~ /\s{3}\<gene\sid\s\=\s\"(\d{1,6})\"\slabel\s\=\s\"([. +|\.]{1,40})\"\>/){
For working with with line.
I don't see the problem with the regexp<gene id = "3" label = "gene_of_interest">
for working with the input line:/^\s{4}\<gene_seq\sid\s\=\s\"(\d{0,6})\"\sstatus\s{0,2}\=\s{0,2} \"(.{0,50})\"\s{0,2}CDS_number\s{0,2}\=\s{0,2}\"(\d{1,3})\"\s{0,2} number_of_CDSs\s{0,2}\=\s{0,2}\"(\d{0,5})\"\s{0,2}sequence_source \s{0,2}\=\s{0,2}\"(.{0,300})\"\s{0,2}startpos\s{0,2}\=\s{0,2}\" (\d{0,9})\"\s{0,2}endpos\s{0,2}\=\s{0,2}\"(\d{0,9})\"\s{0,2} startopen\s{0,2}\=\s{0,2}\"(\d{0,1})\"\sendopen\s{0,2}\=\s{0,2}\"( \d{0,1})\"\s{0,2}complement\s{0,2}\=\s{0,2}\"(.{0,1})\"\>/
<gene_seq id = "3" status = "Sanger source DNA code" CDS_number = "1" number_of_CDSs = "" sequence_source = "/data/databases/flatfiles/seque +nces/species/genome/embl/ch1_Sp.embl" startpos = "125676" endpos = "126224" startopen = "1" endopen = "1" complement = "F">
I have tried using the /x to enable white spaces without success. I think that maybe I need to return to my regexp chapters.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: Regexp problems
by jeffa (Bishop) on Dec 16, 2002 at 15:32 UTC | |
|
Re: Regexp problems
by diotalevi (Canon) on Dec 16, 2002 at 15:49 UTC | |
|
Re: Regexp problems
by BrowserUk (Patriarch) on Dec 16, 2002 at 17:00 UTC | |
|
Re: Regexp problems
by rdfield (Priest) on Dec 16, 2002 at 15:32 UTC | |
|
Re: Regexp problems
by Monky Python (Scribe) on Dec 16, 2002 at 15:45 UTC | |
by matth (Monk) on Dec 16, 2002 at 16:20 UTC | |
|
Re: Regexp problems
by graff (Chancellor) on Dec 17, 2002 at 01:47 UTC |