Chris Daniel has asked for the wisdom of the Perl Monks concerning the following question:
Hi Guys,
Just need a help in regex. I have xml file, but unfortunately some of xml tags consists of incomplete html entities. I was looking for a regex that would remove the incomplete html entities.
For eg: <Remarks>1 SW PLT SLAC 6 PCS </Remarks>
In above example,  is incomplete html entity of & So I need to remove such incomplete data.
Expected output:
I have tried to apply the sed command, but it removes when the pattern is matched.<Remarks>1 SW PLT SLAC 6 PCS </Remarks>
I basically want to replace the string &,&#,,&</c> to blank, but it should not replace </c>&
Please help me.
|
|---|