I\'m making a simple Textile parser and am trying to write a regular expression for \"blockquote\" but am having difficulty matching multiple new lines. Example:
Edit: Ehr, misread the question.. "bq." was significant.
echo preg_replace('/^bq\.(.+?)\n\n/s', '$1
', $str, 1);
Sometimes data that is entered via webforms contains \r\n instead of just \n which would make it
echo preg_replace('/^bq\.(.+?)\r\n\r\n/s', '$1
', $str, 1);
The questionmark makes it add the closing blockquotes after the first double return found ("non-greedy" I believe it's called), so any other double returns are left alone (if that is not what you want, take it out obviously).