s{& (!>(\w+ # regular text entity |#\d+ # decimal character entity |#x[a-fA-F0-9]+) # hexa character entity ;) }{&}gx