Build 1.0_r1(from source)

android.text.util
Class Regex

java.lang.Object
  extended by android.text.util.Regex

public class Regex
extends Object


Field Summary
static Pattern DOMAIN_NAME_PATTERN
           
static Pattern EMAIL_ADDRESS_PATTERN
           
static Pattern IP_ADDRESS_PATTERN
           
static Pattern PHONE_PATTERN
          This pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number.
static Pattern TOP_LEVEL_DOMAIN_PATTERN
          Regular expression pattern to match all IANA top-level domains.
static Pattern WEB_URL_PATTERN
          Regular expression pattern to match RFC 1738 URLs List accurate as of 2007/06/15.
 
Constructor Summary
Regex()
           
 
Method Summary
static String concatGroups(Matcher matcher)
          Convenience method to take all of the non-null matching groups in a regex Matcher and return them as a concatenated string.
static String digitsAndPlusOnly(Matcher matcher)
          Convenience method to return only the digits and plus signs in the matching string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TOP_LEVEL_DOMAIN_PATTERN

public static final Pattern TOP_LEVEL_DOMAIN_PATTERN
Regular expression pattern to match all IANA top-level domains. List accurate as of 2007/06/15. List taken from: http://data.iana.org/TLD/tlds-alpha-by-domain.txt This pattern is auto-generated by //device/tools/make-iana-tld-pattern.py


WEB_URL_PATTERN

public static final Pattern WEB_URL_PATTERN
Regular expression pattern to match RFC 1738 URLs List accurate as of 2007/06/15. List taken from: http://data.iana.org/TLD/tlds-alpha-by-domain.txt This pattern is auto-generated by //device/tools/make-iana-tld-pattern.py


IP_ADDRESS_PATTERN

public static final Pattern IP_ADDRESS_PATTERN

DOMAIN_NAME_PATTERN

public static final Pattern DOMAIN_NAME_PATTERN

EMAIL_ADDRESS_PATTERN

public static final Pattern EMAIL_ADDRESS_PATTERN

PHONE_PATTERN

public static final Pattern PHONE_PATTERN
This pattern is intended for searching for things that look like they might be phone numbers in arbitrary text, not for validating whether something is in fact a phone number. It will miss many things that are legitimate phone numbers.

Constructor Detail

Regex

public Regex()
Method Detail

concatGroups

public static final String concatGroups(Matcher matcher)
Convenience method to take all of the non-null matching groups in a regex Matcher and return them as a concatenated string.

Parameters:
matcher - The Matcher object from which grouped text will be extracted
Returns:
A String comprising all of the non-null matched groups concatenated together

digitsAndPlusOnly

public static final String digitsAndPlusOnly(Matcher matcher)
Convenience method to return only the digits and plus signs in the matching string.

Parameters:
matcher - The Matcher object from which digits and plus will be extracted
Returns:
A String comprising all of the digits and plus in the match

Build 1.0_r1(from source)

Please submit a feedback, bug or feature