I want a method in the following format:
public boolean isValidHtmlEscapeCode(String string);
Usage would be:
isValidHtmlEscapeCode("A") == false
isValidHtmlEscapeCode("ש") == true // Valid unicode character
isValidHtmlEscapeCode("ש") == true // same as 1513 but in HEX
isValidHtmlEscapeCode("�") == false // Invalid unicode character
I wasn't able to find anything that does that - is there any utility that does that? If not, is there any smart way to do it?
&,äand&customEntity;?&, ends with;and middle portion consist of (i) a-z, 0-9 (ii) # followed by digits (iii) #x followed by hex digits?