is there a way to tell the occurence postition of the regex given ??
for example ..
$text = 'PHP Hypertext Preprocessor';
if (preg_match('xt', $text)){
echo 'Found Match';
}
Like in that example occurence position is 11.. I already know about the strpos() .. but that doesnt accept regex .. .
What im trying to do is take user input form a form and filter it ... convert everything to htmlspecialchars ... but only allow <object > </object> tags , and everything in between to stay intact .. " <object width=""></object>" tags...
Any help would be appreciated.