Multiple matches and then replacements of regular expression groups.

now the regular substitution I write will lose T1 data.
want to know how to write this regular,


// 
{
    "field_626kU__c":["t1","t2"],
    "field_7oOpr__c":["t3"]
}
// 
{
    "field_626kU__c":[t1,t2],
    "field_7oOpr__c":[t3]
}
// 
{
    "field_626kU__c":[t2],
    "field_7oOpr__c":[t3]
}

:
:.*\[("([^,]+)"[,]*)+?\]
:[$2]
Mar.21,2021

("([^,|:]+)")(?=\]|,)
$2

the original data is not JSON, just write a script and get it done.

if you have to use regularity, you can only locate "a double-quoted string with square brackets or commas on both sides", and then remove the quotation marks.

also be careful that if there is already a "in your string, it will be escaped. Do you want to remove the escape character?

very strange demand, lack of information can only tell you so much. See shell.cn/articles/10804.html" rel=" nofollow noreferrer "> Xmury question .

Menu