com.atlassian.confluence.plugins.replytoemail
Enum EmailQuoteRegex

java.lang.Object
  extended by java.lang.Enum<EmailQuoteRegex>
      extended by com.atlassian.confluence.plugins.replytoemail.EmailQuoteRegex
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<EmailQuoteRegex>

public enum EmailQuoteRegex
extends java.lang.Enum<EmailQuoteRegex>

Utility class providing a regular expression for matching a email reply heading Based on regex found at http://stackoverflow.com/a/3200611/21234

Since:
5.3

Enum Constant Summary
INSTANCE
           
 
Field Summary
protected static java.lang.String DATE_SEPARATOR
          Regular expression string for matching common date separators
protected static java.lang.String DATE_TIME
          Regular expression string for matching datetime
protected static java.lang.String DATETIME_WITH_HEADING
          Regular expression for matching date heading name, and datetime
protected static java.lang.String ENGLISH_DAY
          Regular expression string for matching both shorthand and full english day names
protected static java.lang.String GMAIL_REPLY_HEADER
          Regular expression string for matching GMail reply 'On {date}, {username} wrote:'
protected static java.lang.String LENIENT_DATE
          Regular expression string for matching multiple date formats
protected static java.lang.String NUMERIC_DAY_W_SUFFIX
          Regular expression string for matching day of month with possible suffix and any number of separators
protected static java.lang.String NUMERIC_MONTH
          Regular expression string for matching numeric month
protected static java.lang.String NUMERIC_OR_ENGLISH_MONTH
          Regular expression string for matching month (numeric and shorthand/full english names)
protected static java.lang.String ORIGINAL_MESSAGE
          Regular expression string for matching '--Original Message--' text
static java.util.regex.Pattern REPLY_EMAIL_HEADING
          Regular expression Pattern for matching a multiple types of reply email quoted headings
protected static java.lang.String SUBJECT_OR_ADDRESS_HEADING
          Regular expression string for matching subject/address line
protected static java.lang.String UNIVERSAL_TIME
          Regular expression string for matching 12/14 hour time (with AM or PM text)
protected static java.lang.String YEAR
          Regular expression string matching full year
 
Method Summary
static EmailQuoteRegex valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static EmailQuoteRegex[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

INSTANCE

public static final EmailQuoteRegex INSTANCE
Field Detail

DATE_SEPARATOR

protected static final java.lang.String DATE_SEPARATOR
Regular expression string for matching common date separators

See Also:
Constant Field Values

UNIVERSAL_TIME

protected static final java.lang.String UNIVERSAL_TIME
Regular expression string for matching 12/14 hour time (with AM or PM text)

See Also:
Constant Field Values

ENGLISH_DAY

protected static final java.lang.String ENGLISH_DAY
Regular expression string for matching both shorthand and full english day names

See Also:
Constant Field Values

NUMERIC_DAY_W_SUFFIX

protected static final java.lang.String NUMERIC_DAY_W_SUFFIX
Regular expression string for matching day of month with possible suffix and any number of separators

See Also:
Constant Field Values

NUMERIC_MONTH

protected static final java.lang.String NUMERIC_MONTH
Regular expression string for matching numeric month

See Also:
Constant Field Values

NUMERIC_OR_ENGLISH_MONTH

protected static final java.lang.String NUMERIC_OR_ENGLISH_MONTH
Regular expression string for matching month (numeric and shorthand/full english names)

See Also:
Constant Field Values

YEAR

protected static final java.lang.String YEAR
Regular expression string matching full year

See Also:
Constant Field Values

LENIENT_DATE

protected static final java.lang.String LENIENT_DATE
Regular expression string for matching multiple date formats

See Also:
Constant Field Values

DATE_TIME

protected static final java.lang.String DATE_TIME
Regular expression string for matching datetime

See Also:
Constant Field Values

ORIGINAL_MESSAGE

protected static final java.lang.String ORIGINAL_MESSAGE
Regular expression string for matching '--Original Message--' text

See Also:
Constant Field Values

DATETIME_WITH_HEADING

protected static final java.lang.String DATETIME_WITH_HEADING
Regular expression for matching date heading name, and datetime

See Also:
Constant Field Values

SUBJECT_OR_ADDRESS_HEADING

protected static final java.lang.String SUBJECT_OR_ADDRESS_HEADING
Regular expression string for matching subject/address line

See Also:
Constant Field Values

GMAIL_REPLY_HEADER

protected static final java.lang.String GMAIL_REPLY_HEADER
Regular expression string for matching GMail reply 'On {date}, {username} wrote:'

See Also:
Constant Field Values

REPLY_EMAIL_HEADING

public static final java.util.regex.Pattern REPLY_EMAIL_HEADING
Regular expression Pattern for matching a multiple types of reply email quoted headings

Method Detail

values

public static EmailQuoteRegex[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (EmailQuoteRegex c : EmailQuoteRegex.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static EmailQuoteRegex valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
java.lang.NullPointerException - if the argument is null


Copyright © 2003-2014 Atlassian. All Rights Reserved.