Here you can find the source of normalizeString(String str)
private static String normalizeString(String str)
//package com.java2s; //License from project: Apache License import java.text.Normalizer; import java.util.regex.Pattern; public class Main { public static final Pattern NORMAL_PATTERN = Pattern.compile("\\p{InCombiningDiacriticalMarks}+"); private static String normalizeString(String str) { return NORMAL_PATTERN.matcher(Normalizer.normalize(str.toLowerCase(), Normalizer.Form.NFD)).replaceAll("") .replaceAll("[^A-Za-z0-9]", ""); }/* www.j a v a 2s .co m*/ }