I need to trim image filenames inside json to empty values, so I'v started to try with regex. There are different image tags in json but they all end with "_url" suffix. Tried various combinations with regex but with no luck. How such regex could look like?
Here's what I have:
{ "list" :
[
{
"id" : 123,
"name" : "some name",
"description" : "Lorem ipsum",
"logo_image_url": "222.png",
"content_image_url" : "1355.png"},
{
"id" : 123,
"name" : "some other name",
"description" : "Lorem ipsum",
"logo_image_url": "111.png",
"content_image_url" : "1355.png"
}
]
}
And this is what I need to make:
{ "list" :
[
{
"id" : 123,
"name" : "some name",
"description" : "Lorem ipsum",
"logo_image_url": "",
"content_image_url" : ""},
{
"id" : 123,
"name" : "some other name",
"description" : "Lorem ipsum",
"logo_image_url": "",
"content_image_url" : ""
}
]
}