Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use ")" in a replaceAll method?

Status
Not open for further replies.

royboy75

Programmer
Feb 13, 2007
114
GB
Hello,

I am trying to replace every "(" and ")" occurence in a String but when I am using the replaceAll method, i.e:
data.replaceAll("(","") it treats it as an illegal regular expression.
How can I "tell" this methos that I would like to replace these signs and not to treat it as regular expressions.
 
Solved it.
I'll be using \p{Punct} instead...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top