Click here to Skip to main content
15,885,309 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
here's my script

HTML
<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>


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 ?
Posted
Updated 19-Nov-12 21:30pm
v2

1 solution

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


you can use it, for more you can see this.
 
Share this answer
 
Comments
Nikhil_S 20-Nov-12 4:42am    
it's removing all the parentheses i want to remove only the inner one "(8pin)" if i remove the outer one i will get error.
AmitGajjar 20-Nov-12 5:02am    
all the time you have this single query ?
or you may have different query ?
Nikhil_S 20-Nov-12 5:20am    
same single query.
AmitGajjar 20-Nov-12 5:22am    
then use this : Regex.Replace("This (is (a) (test.", "[(8pin)]", "");
AmitGajjar 20-Nov-12 5:22am    
let me know if it works?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900