|
Posted by Colin McKinnon on 07/27/06 21:34
vito wrote:
> I'm processing the following sequence with length more than 100k
>
> 1 cagatgctga taaaaaagtg tgttcctcat agcatttatt taattgaaat atttcaagaa
> 61 cttgaatgta ctaaaaattg agacaaacag tagcaaatca taaaaaaaaa
> ttgaagtgaa
> 121 ttttacaact ggattcatgt gcctaatatt ttcattggga agtggattca
> tgtttaacat 181 ttccattggg <snippet>
>
Nice genes.
> i wrote a program
>
> <?php
> session_start();
>
> if (isset ($_POST['seq']) )
> $seq = $_POST['seq'];
> else
> $seq= $_GET['seq'];
>
> $seq = preg_replace("/[\s\r\n0-9]/", "", $seq);
> echo $seq;
>
> ?>
You provided an example of the input but not the output, so I'm not quite
sure. But...
Since you're using PCRE, why not:
/[\s\r\n\d]/
or even
/[^ctag]/
It improbable, but you do know that \s doesn't match ascii chr(11) but
[:space:] does.
HTH
C.
Navigation:
[Reply to this message]
|