Thursday, August 27, 2009, 4:04:43 PM, Peter wrote:

> if (preg_match('/^(?:\...@]|[^[])*...@]\]/', $line))

thanks Peter! Much better than my attempt.
I would need a second preg_match, as you said, for  ...=]... orphans.

I am only running this for single text rows.
The main reason I need to tidy up orphans like this is
that TextExtract takes lines from pages, so multiline spanning
[@ ... @] can get orphaned, and the results are often ugly very long
preformatted lines, because a closing @] is missing.
If an opening [@ is missing, the string will not get preformatted,
and the closing @] will be visible. not nice either.
So tidying up the rows is essential.



Hans


_______________________________________________
pmwiki-devel mailing list
pmwiki-devel@pmichaud.com
http://www.pmichaud.com/mailman/listinfo/pmwiki-devel

Reply via email to