
js正则表达式替换括号字符串
rect1:{type:'start',text:{text:'开始'},img:{src:'img/48/start_event_empty.png',width:48...
rect1:{type:'start',text:{text:'开始'},img:{src:'img/48/start_event_empty.png',width:48,height:48},attr:{ x:409, y:10, width:50, height:50}, props:{text:{value:'开始'},temp1:{value:''},temp2:{value:''}}},
rect2:{type:'task',text:{text:'任务1'},img:{src:'img/48/task_empty.jpg',width:48,height:48},attr:{ x:386, y:116, width:100, height:50}, props:{text:{value:'任务1'},assignee:{value:''},form:{value:''},desc:{value:''},style1:{value:''}}},
rect3:{type:'fork',text:{text:'分支'},img:{src:'img/48/gateway_parallel.png',width:48,height:48},attr:{ x:410, y:209, width:50, height:50}, props:{text:{value:'分支'},temp1:{value:''},temp2:{value:''}}},
请问如何使用JS正式表达表替换掉
img:{src:'img/48/start_event_empty.png',width:48,height:48},attr:{ x:409, y:10, width:50, height:50}这名话。 展开
rect2:{type:'task',text:{text:'任务1'},img:{src:'img/48/task_empty.jpg',width:48,height:48},attr:{ x:386, y:116, width:100, height:50}, props:{text:{value:'任务1'},assignee:{value:''},form:{value:''},desc:{value:''},style1:{value:''}}},
rect3:{type:'fork',text:{text:'分支'},img:{src:'img/48/gateway_parallel.png',width:48,height:48},attr:{ x:410, y:209, width:50, height:50}, props:{text:{value:'分支'},temp1:{value:''},temp2:{value:''}}},
请问如何使用JS正式表达表替换掉
img:{src:'img/48/start_event_empty.png',width:48,height:48},attr:{ x:409, y:10, width:50, height:50}这名话。 展开
1个回答
展开全部
str.replace("img:{src:'img/48/start_event_empty.png',width:48,height:48},attr:{ x:409, y:10, width:50, height:50}","");就可以了
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询