正则表达式删除内部括号 [英] regex to remove inner parentheses

查看:171
本文介绍了正则表达式删除内部括号的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的脚本

here''s my script

<pomoddata>
    <Scripts>
    <script>insert into POMOD_Q2ODATA (moc_id,id,DocID,OriginalSalesOrderNumber,ChapterID,ChapterNumber,BookingType,Qty,ProductNumber,ProductDescription,NetPrice,LineItem,SalesOrderNumber,POMODCreatedDate,POMODCompletedDate) values('V4C20120228084130HP53','201560','208427','6301123146','140944','001000','Product Cancellation','2','M1943AL','Sp02 8-pin D-sub Adapter cable 3m (8pin)','-225.68','','','2012-05-21 10:18:06.67','2012-06-18 09:54:53.45')
</script>
  </Scripts>  
</pomoddata>



我想在插入查询"Sp02 8针D-sub适配器电缆3m (8pin) "的产品描述"值中删除括号,因为在访问数据库中不允许在括号中插入数据.有人可以在这个主题中为我提供帮助吗?



I want to remove parenteses in Product Description value of my insert query "Sp02 8-pin D-sub Adapter cable 3m (8pin)" because in access database it''s not allowing to insert data with parenteses.Can anyone please help me in this topic ?

推荐答案

Regex.Replace("This (is (a) (test.", "[()]", "");



您可以使用它,有关更多信息,请参见.



you can use it, for more you can see this.


这篇关于正则表达式删除内部括号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆