Search:

Type: Posts; User: andbin

Search: Search took 0.22 seconds.

  1. Thread: Palindromes?

    by andbin
    Replies
    6
    Views
    1,194

    Re: Palindromes?

    However, if you are curious and want to see a single regex to match all those chars, it's this:


    String s = "A,B.C!D E\"F'G?H(I)J";
    String s2 = s.replaceAll("[,.! \"'?()]", "");
    ...
  2. Thread: Palindromes?

    by andbin
    Replies
    6
    Views
    1,194

    Re: Palindromes?

    Sorry if I repeat myself, but it seems you don't have even basic knowledges on regexs, so my suggestion is to use replace instead of replaceAll.
  3. Thread: Palindromes?

    by andbin
    Replies
    6
    Views
    1,194

    Re: Palindromes?

    replaceAll works with a regular expression and in regexs '?', '(' and ')' are special characters with a specific meaning.

    It seems you are not interested in regexs, so use replace(CharSequence...
Results 1 to 3 of 3