Forum Moderators: coopster
I have the following problem: I have a form containing a textarea.
In the textarea, the user supplies his/her data in the form of
>seq1
MGTKGTIGTGRTKGTRGKTRKGTGKTRG
>seq2
RTRTGRGRTGTRGTRGTGTGTRGTVTGTGTRGTRT
etc
I want to pass each pair (containing of >seq and a sequence under it) into variables for a perl script.
Is there a way to do it via PHP? How do you call the perl script in order to feed it the data?
In PHP you can take the textarea value and parse it using a regular expression.
$seq = preg_split [php.net]("/\n?>seq\d+\n/", trim($textarea), -1, PREG_SPLIT_NO_EMPTY);