vendredi 31 juillet 2015

Java regular expression : how to get rid of text inside ()? [duplicate]

This question already has an answer here:

I have some text like this : Javascript (12+ years), Java (10 years) How to use regular expression to extract the following text : Javascript, Java

I've seen that link, have you tried it ? It doesn't work in my case ! The answer below works : replaceAll("\\((.+)\\)","")

Aucun commentaire:

Enregistrer un commentaire