# Special case just for Textpatterns one line tags. $text = preg_replace_callback('{ (?: (?<=\n\n) # Startingafter a blank line | # or \A\n? # thebeginning of the doc ) ( # save in $1 [ ]{0,'.$less_than_tab.'} <(txp)(.*) # start tag = $2 \b # word break ([^<>])*? # /?> # the matching end tag [ \t]* (?=\n{2,}|\Z) # followed by a blank line or end of document ) }x', '_HashHTMLBlocks_callback', $text);