# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/((?<=<|<\\/)|(?<= ))[A-Za-z0-9]+:| xmlns(:[A-Za-z0-9]+)?=".*?"//g;t' <<< "<?xml version=\"1.0\" encoding=\"utf-16\"?>
<ArrayOfInserts xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">
<insert>
<offer xmlns=\"http://schema.peters.com/doc_353/1/Types\">0174587</offer>
<type2 xmlns=\"http://schema.peters.com/doc_353/1/Types\">014717</type2>
<supplier xmlns=\"http://schema.peters.com/doc_353/1/Types\">019172</supplier>
<id_frame xmlns=\"http://schema.peters.com/doc_353/1/Types\" />
<type3 xmlns=\"http://schema.peters.com/doc_353/1/Types\">
<type2 />
<main>false</main>
</type3>
<status xmlns=\"http://schema.peters.com/doc_353/1/Types\">Some state</status>
</insert>
</ArrayOfInserts>"
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for SED, please visit: https://www.gnu.org/software/sed/manual/html_node/The-_0022s_0022-Command.html