Try it this way
- "when I apply to remove one at a time the right", take and assemble it, as follows:
- [ "value-1"|"value-2"|"value-3"] test and see if it is right.
- Detail this can be much slower than removing one by one
- Put the result there, I couldn’t test it here.
No pull, you have programming error, not regular expression parsing.
public class ManipulandoString{
public static void main(String[] args){
String[] vetor = {"\"Jui.ce \"", "j-90.0", "Abobr.e-u"};
String[] result = new String[3];
for(int i=0; i <vetor.length; i++)
result[i]=vetor[i].replaceAll("[.|\"|\\(|\\)|-]", "");
for(int i = 0; i < vetor.length; i++)
System.out.println(result[i]);
}
}
look at the result this, I tried to update in the test, I think it’s there, if not just copy from here to there.
Good Night, Felipe! Thank you... it worked https://goo.gl/oVez3R Online IDE just to share with you how it works.
– alxwca
good (+1). A small detail: the character
-
in character sets needs to be protected:[)-.]
=[)*+,-]
– JJoao