in reply to Regexp problems

That's tremendously ugly. I'm not even going to try to make the code work. In fact, all I'm doing here is making it somewhat readable so your code can be worked with. This code is still very fragile and you should be using a proper parser. I figure that whether you use this or not it's a good example of how to rewrite your regex for readability and what to do with the /x parameter.

The specific things I did were throw away all those \s{0,2} constructs in favor of \s+. The .{0,50} construct was completely breaking things so I replaced those with [^"]+ since that better expresses your intent. And of course I used /x so I could throw white space into the expression and format it for readability.

m{<gene_seq \s+ id \s+ = \s+ "(\d+)" \s+ status \s+ = \s+ "([^"]+)" \s+ CDS_number \s+ = \s+ "(\d+)" \s+ number_of_CDSs \s+ = \s+ "(\d+)" \s+ sequence_source \s+ = \s+ "([^"]+)" \s+ startpos \s+ = \s+ "(\d+)" \s+ endpos \s+ = \s+ "(\d+)" \s+ startopen \s+ = \s+ "(\d+)" \s+ endopen \s+ = \s+ "(\d+)" \s+ complement \s+ = \s+ "([^"]+)" \s+ >}x

Fun Fun Fun in the Fluffy Chair