Re: copy ...

From: Date: Mon, 17 Mar 2003 12:13:50 +0000
Subject: Re: copy ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139935@lists.php.net to get a copy of this message
I have a strong feeling that POSIX regexs cannot do multiline, try using perl-compatible, or make a loop to read the textarea content line by line John Taylor-Johnston wrote:
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/


« previous php.general (#139935) next »