considering i have an offset marking the start of the word.. i need a method to get the size of that word considering all the sign of punctuation.
example:
$str = "my text bla bla-bla; hello! abc";
$offset = "22"; // start of hello
now i need a function that returns 5 considering hello is 5 chars.
this are some of punctuations may occur:
array(',','.',' ','-',"'",'"',';',':','?','!','|','/','\\','<','>')
i can do some hard parsing but i would like to write something more elegant