hi,
i'm trying to parse the info. retrieved from a web page as follows:
but the problem is, there are several lines in the $buffer variable that has the same pattern. for example,
DE Potassium voltage-gated channel subfamily A member 3 (Voltage-gated
DE potassium channel subunit Kv1.3) (HPCN3) (HGK5) (HuKIII) (HLK3).
which is what i am interested in, but also, there are lines that the above pattern matches, such as,
RP NUCLEOTIDE SEQUENCE [GENOMIC DNA].
which i am not interested in. i tried using '^' infront of DE ("/^DE\s+(.+)/"), but doesn't work at all.
please help.
Thanks a lot in advance.
i'm trying to parse the info. retrieved from a web page as follows:
Code:
$text_info = curl_init("http://domain.com/info.txt");
$buffer = curl_exec($text_info);
if (preg_match_all("/DE\s+(.+)/", $buffer, $desc)) { $description .= $desc[1]; }
DE Potassium voltage-gated channel subfamily A member 3 (Voltage-gated
DE potassium channel subunit Kv1.3) (HPCN3) (HGK5) (HuKIII) (HLK3).
which is what i am interested in, but also, there are lines that the above pattern matches, such as,
RP NUCLEOTIDE SEQUENCE [GENOMIC DNA].
which i am not interested in. i tried using '^' infront of DE ("/^DE\s+(.+)/"), but doesn't work at all.
please help.
Thanks a lot in advance.
Comment