I have written a simple regular expression to break a string at the occurance of either
or
This is it -
$text_chunks = preg_split("(\[HTML\]|\[\/HTML\])", $text);
That works fine, but later on I need to know what preceded the chunk of text (ie
of
) Can I make the regualar expression go back 6 places so that it will return either
"
hjgdsgshjgjhfgdsgfgshjgfd"
or
"/HTML] jvhghjkdgjghsjg"
So that later on I can see what the string starts with?