Thanks for your valuable explanations. But it seems that I've failed to brief my actual requirement. The input string and desired output required were given below:
input string: LINK:['IM219PLANNING_ARA1','IM219MIR_ARA1','IM18Q4_ARA1','SM18Q4_ARA1','IM118Q4DYNVA_ARA1','IM218Q4DYNVA_ARA1','IM119EIOPALTG_ARA1','IM219EIOPALTG_ARA1','SM119EIOPALTG_ARA1']}
Desired output: LINK:['IM219MIR_ARA1','IM18Q4_ARA1','SM18Q4_ARA1','IM118Q4DYNVA_ARA1','IM218Q4DYNVA_ARA1','IM119EIOPALTG_ARA1','IM219EIOPALTG_ARA1','SM119EIOPALTG_ARA1']}
Here 'IM219PLANNING_ARA1', was removed as part of an another bash script. This bash script is having a variable name "araname" in which user will provide any of the ARA's specified inside the LINK:[]. So my job is remove that particular array only without affecting the javascript syntax. Mean remove start and end single quotes, comma. Also if araname is belongs to end of LINK:[] then no need to remove comma. Any luck?
LINK:[]
?IM219PLANNING_ARA1
or do you need to remove everything inside theLINK[ ]
?IM219PLANNING_ARA1
), and he would apply this same command for theDESCRIPTION
line. So result forLINK
line would be :LINK:['IM219MIR_ARA1','IM18Q4_ARA1','SM18Q4_ARA1','IM118Q4DYNVA_ARA1','IM218Q4DYNVA_ARA1','IM119EIOPALTG_ARA1','IM219EIOPALTG_ARA1','SM119EIOPALTG_ARA1']}