Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>That depends on what you mean. If you just want to get rid of them, do this:<br> <em>(Update: Apparently you want to keep digits as well, use the second lines in that case)</em></p> <pre><code>String alphaOnly = input.replaceAll("[^a-zA-Z]+",""); String alphaAndDigits = input.replaceAll("[^a-zA-Z0-9]+",""); </code></pre> <p>or the equivalent:</p> <pre><code>String alphaOnly = input.replaceAll("[^\\p{Alpha}]+",""); String alphaAndDigits = input.replaceAll("[^\\p{Alpha}\\p{Digit}]+",""); </code></pre> <p>(All of these can be significantly improved by precompiling the regex pattern and storing it in a constant)</p> <p>Or, with <a href="http://code.google.com/p/guava-libraries/" rel="noreferrer">Guava</a>:</p> <pre><code>private static final CharMatcher ALNUM = CharMatcher.inRange('a', 'z').or(CharMatcher.inRange('A', 'Z')) .or(CharMatcher.inRange('0', '9')).precomputed(); // ... String alphaAndDigits = ALNUM.retainFrom(input); </code></pre> <p>But if you want to turn accented characters into something sensible that's still ascii, look at these questions:</p> <ul> <li><a href="https://stackoverflow.com/questions/3707977/converting-java-string-to-ascii/3708078#3708078">Converting Java String to ASCII</a></li> <li><a href="https://stackoverflow.com/questions/4122170/java-change-aeou-to-aeouu/4122207#4122207">Java change áéőűú to aeouu</a></li> <li><a href="https://stackoverflow.com/questions/1453171/n---n------------n-or-remove-diacritical-marks-from">ń ǹ ň ñ ṅ ņ ṇ ṋ ṉ ̈ ɲ ƞ ᶇ ɳ ȵ --> n or Remove diacritical marks from unicode chars</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload