Ilmari Karonen (2011-01-30 15:19): > On 01/30/2011 04:16 PM, Platonides wrote: >> Ilmari Karonen wrote: >>> Hmm... I don't really know what's going on inside PHP's PCRE >>> implementation, but you might want to try replacing that regexp with: >>> >>> $parser->add( '/\\/\\*.*?\\*\\//s' ); >> The add()s are combined into a single big regex, you can't set dot-all. >> Doing it with (?s) may be factible, though. > Hmm, so maybe: > > $parser->add( '/(?s:\\/\\*.*?\\*\\/)/' ); > > Or if that doesn't work, try something else that matches everything > without parens, like [\s\S] or [\d\D].
Personally I like the [\s\S] construct, but maybe adding ?: in the parentheses would work: > $parser->add( '/\\/\\*(?:.|[\\r\\n])*?\\*\\//' ); Just guessing, but maybe the problem occurred because the script was trying to catch something in them... Cheers, Nux. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l