Saturday, 7 September 2013

how to replace all instances of "[" and "]"

how to replace all instances of "[" and "]"

I have a string that looks like this: [hello world] and i want to get
hello world
having hard time finding the right regex for the replaceAll method for java
String s = s.replaceAll("[[]]",""); throws an exeption
what is the right regex for it ?

No comments:

Post a Comment