I need to process the contents of <textarea name="textarea">

<textarea name="textarea">SU: something ... blah blah¶
TI: Title ... asasa asasas asas¶
AU: author field ... asasasas¶
</textarea>

I want to filter $textarea. I need to change my code below to grab everything between 
"TI:" and "¶", but not including "¶" :

I have this code.

--------snip------------

filter_strings("TI: ", $textarea)

function filter_strings($tofilter,$line){
    if(eregi('^'.$tofilter.' (.*)$',$line,$m)) {
        $filtered=$m[1];
        return $filtered;
     }
}


--
John Taylor-Johnston
-----------------------------------------------------------------------------
Université de Sherbrooke:
http://compcanlit.ca/


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to