So I have this string that looks like this:
I/O complained/O to/O Microsoft/ORGANIZATION about/O Bill/PERSON Gates/PERSON ./O They/O told/O me/O to/O see/O the/O mayor/O of/O New/LOCATION York/LOCATION ./O
and I want to output it like this:
I complained to <span class="ORAGANIZATION"> Microsoft</span> about <span class="PERSON">Bill</span>
Im done with the /O thing i did it with just preg_replace what my problem is the Microsoft/ORGANIZATION i need the REGEX for this. I tried finding the word first using this:
$text_vars = preg_match("/PERSON|ORGANIZATION/", $string, $matches);
$temp = array_shift( $matches );