public final class PatternConsts
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.regex.Pattern |
DICTIONARY_ZIP
Pattern for detecting remote dictionary file archives
|
static java.util.regex.Pattern |
EQUIV_TEXT_ATTRIBUTE_DECOMPILE
Pattern that matches an equiv-text attribute as used in XLIFF inline codes.
|
static java.util.regex.Pattern |
HTML_BR
Pattern for detecting html <BR> tags
|
static java.util.regex.Pattern |
HTML_ENCODING
compiled pattern to extract the encoding from HTML file, if any
|
static java.util.regex.Pattern |
HTML_HEAD
Compiled pattern to look for HTML file HEAD declaration.
|
static java.util.regex.Pattern |
HTML_HTML
compiled pattern to look for HTML file HTML declaration
|
static java.util.regex.Pattern |
HTML5_ENCODING
compiled pattern to extract the encoding from HTML5 file, if any
|
static java.util.regex.Pattern |
LANG_AND_COUNTRY
Pattern that detects language and country, with an optionnal script in the middle.
|
static java.util.regex.Pattern |
LINE_ENDING
compiled pattern to match line ending win/mac/linux
|
static java.util.regex.Pattern |
OMEGAT_TAG
Pattern that matches omegat-specific tags (with leading < and trailing
> in any place of a string).
|
static java.util.regex.Pattern |
OMEGAT_TAG_DECOMPILE
Pattern that matches omegat-specific tags (with leading < and trailing
> in any place of a string) and decompiles them into pieces:
leading /, if any
tag shortcut
tag number
trailing /, if any
Call
matcher.group(n) to get each piece. |
static java.util.regex.Pattern |
OMEGAT_TAG_ONLY
Pattern that matches full string containing in full and only
omegat-specific tag (without leading < and trailing >).
|
static java.util.regex.Pattern |
OMEGAT_TAG_SPACE
Pattern that matches omegat-specific tags (with leading < and trailing
> in any place of a string) plus a space after it.
|
static java.util.regex.Pattern |
PRINTF_VARS
Pattern for detecting the placeholders in a printf-function string which
can occur in languages like php, C and others.
|
static java.util.regex.Pattern |
PROTECTED_PARTS_PAIRED_TAG_DECOMPILE
Pattern that matches paired tag in protected parts
opening tag
text between tags
closing tag
Call
matcher.group(n) to get each piece. |
static java.util.regex.Pattern |
REGEX_VARIABLE
Pattern for regular expression variable : $n, where n is a number, but should not be preceded by backslash
|
static java.util.regex.Pattern |
SIMPLE_JAVA_MESSAGEFORMAT_PATTERN_VARS |
static java.util.regex.Pattern |
SIMPLE_PLACEHOLDERS
Pattern for detecting OmegaT-tags and other placeholders (extended sprintf-variant) in texts
|
static java.util.regex.Pattern |
SIMPLE_PRINTF_VARS
Pattern for detecting the placeholders in a printf-function string.
|
static java.util.regex.Pattern |
SPACE_OMEGAT_TAG
Pattern that matches omegat-specific tags (with leading < and trailing
> in any place of a string) with a space before it.
|
static java.util.regex.Pattern |
SPACE_TAB |
static java.util.regex.Pattern |
SPACY_REGEX
Pattern that detects space-only regular expressions.
|
static java.util.regex.Pattern |
XML_DOCTYPE
Compiled pattern to extract the DOCTYPE declaration from XML file, if
any.
|
static java.util.regex.Pattern |
XML_ENCODING
Compiled pattern to extract the encoding from XML file, if any.
|
static java.util.regex.Pattern |
XML_HEADER
compiled pattern to match XML header
|
static java.util.regex.Pattern |
XML_ROOTTAG
Compiled pattern to extract the root tag from XML file, if any.
|
static java.util.regex.Pattern |
XML_XMLNS
Compiled pattern to extract the xlmns declaration from an XML file, if
any.
|
Modifier and Type | Method and Description |
---|---|
static java.util.regex.Pattern |
getCustomTagPattern() |
static java.util.regex.Pattern |
getPlaceholderPattern()
Returns the placeholder pattern (OmegaT tags, printf tags, java
MessageFomat tags, custom tags, combined according to user configuration)
|
static java.util.regex.Pattern |
getRemovePattern() |
static void |
updateCustomTagPattern()
Resets the remove pattern.
|
static void |
updatePlaceholderPattern()
Resets the placeholder pattern.
|
static void |
updateRemovePattern()
Resets the remove pattern.
|
public static final java.util.regex.Pattern XML_ENCODING
public static final java.util.regex.Pattern XML_HEADER
public static final java.util.regex.Pattern XML_DOCTYPE
public static final java.util.regex.Pattern XML_ROOTTAG
public static final java.util.regex.Pattern XML_XMLNS
public static final java.util.regex.Pattern HTML_ENCODING
public static final java.util.regex.Pattern HTML5_ENCODING
public static final java.util.regex.Pattern HTML_HEAD
public static final java.util.regex.Pattern HTML_HTML
public static final java.util.regex.Pattern HTML_BR
public static final java.util.regex.Pattern OMEGAT_TAG_ONLY
public static final java.util.regex.Pattern OMEGAT_TAG
public static final java.util.regex.Pattern OMEGAT_TAG_SPACE
public static final java.util.regex.Pattern SPACE_OMEGAT_TAG
public static final java.util.regex.Pattern OMEGAT_TAG_DECOMPILE
matcher.group(n)
to get each piece.public static final java.util.regex.Pattern PROTECTED_PARTS_PAIRED_TAG_DECOMPILE
matcher.group(n)
to get each piece.public static final java.util.regex.Pattern EQUIV_TEXT_ATTRIBUTE_DECOMPILE
public static final java.util.regex.Pattern SPACY_REGEX
public static final java.util.regex.Pattern LANG_AND_COUNTRY
public static final java.util.regex.Pattern DICTIONARY_ZIP
public static final java.util.regex.Pattern SPACE_TAB
public static final java.util.regex.Pattern REGEX_VARIABLE
public static final java.util.regex.Pattern LINE_ENDING
public static final java.util.regex.Pattern PRINTF_VARS
echo printf(gettext("%s is very %s"), "OmegaT", "great");
public static final java.util.regex.Pattern SIMPLE_PRINTF_VARS
PRINTF_VARS
public static final java.util.regex.Pattern SIMPLE_JAVA_MESSAGEFORMAT_PATTERN_VARS
public static final java.util.regex.Pattern SIMPLE_PLACEHOLDERS
public static java.util.regex.Pattern getPlaceholderPattern()
updatePlaceholderPattern()
public static void updatePlaceholderPattern()
public static java.util.regex.Pattern getRemovePattern()
public static void updateRemovePattern()
public static java.util.regex.Pattern getCustomTagPattern()
public static void updateCustomTagPattern()