Android examples for android.util:Patterns
find Url using predefined pattern from android.util.Patterns
import java.util.regex.Matcher; import android.util.Patterns; public class Main{ public static String findUrl(String text) { String url;// w w w. j av a 2 s. c om Matcher matcher = Patterns.WEB_URL.matcher(text); url = matcher.group(0); return url; } }