I have a string variable containing mix of HTML Entities of Japanese characters, I would like to get the length of the string, and treat each HTML Entity as length of 2, and standard English character as length of 1.
I would like to use regular express for matching the &#xxxxx; counts, how can I get this done?
eg. $str contains abc&#xxxxx;123&#xxxxx;xyz
Normally, I would get the length of 25, but instead, I would like to get length of 11.