I'm trying to remove delimiter |
with in the quotes using sed on text which contains dates, nulls, strings with pipe delimiter. I used following sed its working fine but its removing delimiter between dates. Any help will be appreciated.
sed -E 's/(^|[^"|])\|($|[^"|])/\1 \2/g' <file>
Input:
"Southern|Palms"|"AA|None"|"4"|"Ken|Coast"|1/11/2019 00:00:00|30/4/2020 00:00:00|"TH"|
Returns:
"Southern Palms"|"AA None"|"4"|"Ken Coast"|1/11/2019 00:00:00 30/4/2020 00:00:00|"TH"|
Expected Output:
"Southern Palms"|"AA None"|"4"|"Ken Coast"|1/11/2019 00:00:00|30/4/2020 00:00:00|"TH"|