I want to delete all "tags":[xxxxx] array in a JSON text string e.g. "aaa":"bbb","tags":[abcdefg],"ccc":"ddd"
I used grep to get the regular expression right
- tried this:
grep \"tags\":\[.*\]
==> this didn't work - tried this:
grep \"tags\":\\[.*\]
==> this works
to escape the [
character in grep command, why two \
is required?
then I tried to use sed to replace "tags":[abcdefg]
sed s/\"tags\":\\[.*\]//g
it does not work.
Can someone give suggestion?