protected array Solar_Markdown::_explodeTags ( string $str )

Explodes source text into tags and text


  • (string) $str: A string of HTML.


  • (array) The string exploded into tag and non-tag portions.


Explodes source text into tags and text

Regular expression derived from the _tokenize() subroutine in Brad Choate's » MTRegex plugin.

From the original notes ...

Returns an array of the tokens comprising the input string. Each token is either a tag (possibly with nested, tags contained therein, such as <a href="<MTFoo>">, or a run of text between tags. Each element of the array is a two-element array; the first is either 'tag' or 'text'; the second is the actual value.