XML, unlike HTML, only knows four named entities: <
, >
, '
and "
.
I have been using XMLWriter in PHP to write lots of data to an XML file, and first I escape the desired text, which gives me some other entities, such as Â
and ¤
.
I have tried the following regex:
&(?!(apos|quot|[gl]t|amp);)
but it only matches the &
and not Â
or ¤t;
.
What am I doing wrong?