# If you'd like to omit non-matching lines from the result; add ';d' to the end of the expression.
sed -E 's/("UID\s*([^\n\r]*))/$1,"X":""/gm;t' <<< "{
\"Tabelle1\": [
{
\"Nr.\": \"1\",
\"Firma\": \"Alba Reisen/Versicherungen/Darlehen H. Kajtazi\",
\"Rechtsform\": \"EIU\",
\"Sitz\": \"Rapperswil-Jona\",
\"Kanton\": \"SG\",
\"UID\": \"CHE‑101.868.757\"
},
{
\"Nr.\": \"2\",
\"Firma\": \"Alybaba - Schischa Laden, Aly\",
\"Rechtsform\": \"EIU\",
\"Sitz\": \"Wil (SG)\",
\"Kanton\": \"SG\",
\"UID\": \"CHE‑102.012.121\"
},
{
\"Nr.\": \"3\",
\"Firma\": \"Bluamawerkstatt zur Linde Marianne Bislin-Lieberherr\",
\"Rechtsform\": \"EIU\",
\"Sitz\": \"Pfäfers\",
\"Kanton\": \"SG\",
\"UID\": \"CHE‑217.602.289\"
},
]
}
"
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