Here you can find the source of getTokens(String value)
public static List<String> getTokens(String value)
//package com.java2s; import java.util.Arrays; import java.util.List; public class Main { public static List<String> getTokens(String value) { return Arrays.asList(value.replaceAll("[^a-zA-Z0-9]", " ").split("[\\s@&.?$+-]+")); }//from w w w .java 2 s . c o m }