|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.linkwerk.util.Regexp
public abstract class Regexp
Regexp Regular Expressions covers extension functions that provide facilities to do with regular expressions to XSLT.
This package implements the regular expression extension following the rules given by exslt.org.
The regular expressions used in this module use the
regular expression syntax of the java.util.regex package
of
the Java 2 Platform, Standard Edition (since 1.4),
and are not following the Javascript regular expression syntax.
java.util.regex
package of
the Java 2 Platform, Standard Edition (since 1.4)Constructor Summary | |
---|---|
Regexp()
|
Method Summary | |
---|---|
static org.w3c.dom.NodeList |
match(org.w3c.dom.NodeList nl,
java.lang.String pattern)
The match function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter node list, captured by the
second parameter regular expression
All the text nodes or attributes of the elements or
attribute values of the node list are concatenated
before the match is executed. |
static org.w3c.dom.NodeList |
match(org.w3c.dom.NodeList nl,
java.lang.String pattern,
java.lang.String flags)
The match function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter node list, captured by the
second parameter regular expression. |
static org.w3c.dom.NodeList |
match(java.lang.String input,
java.lang.String pattern)
The match function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter string, captured by the
second parameter regular expression. |
static org.w3c.dom.NodeList |
match(java.lang.String input,
java.lang.String pattern,
java.lang.String flags)
The match function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter string, captured by the
second parameter regular expression
The second parameter is a regular expression that
follows the regular expression syntax of the
java.util.regex package of the
Java 2 Platform, Standard Edition (since 1.4). |
static java.lang.String |
replace(org.w3c.dom.NodeList nl,
java.lang.String pattern,
java.lang.String flags,
java.lang.String replace)
The replace function returns a string with parts
of the string given as the first parameter that match
second parameter regular expression replaced with another string. |
static java.lang.String |
replace(java.lang.String input,
java.lang.String pattern,
java.lang.String flags,
java.lang.String replace)
The replace function returns a string with parts
of the string given as the first parameter that match
second parameter regular expression replaced with another string. |
static boolean |
test(org.w3c.dom.NodeList nl,
java.lang.String pattern)
The test function returns true if the node list given
as the first parameter matches the regular expression
given as the second parameter. |
static boolean |
test(org.w3c.dom.NodeList nl,
java.lang.String pattern,
java.lang.String flags)
The test function returns true if the node list given
as the first parameter matches the regular expression
given as the second parameter. |
static boolean |
test(java.lang.String input,
java.lang.String pattern)
The test function returns true if the string given
as the first parameter matches the regular expression
given as the second parameter. |
static boolean |
test(java.lang.String input,
java.lang.String pattern,
java.lang.String flags)
The test function returns true if the string given
as the first parameter matches the regular expression
given as the second parameter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Regexp()
Method Detail |
---|
public static boolean test(org.w3c.dom.NodeList nl, java.lang.String pattern)
test
function returns true if the node list given
as the first parameter matches the regular expression
given as the second parameter.
The input sequence is scanned looking for the first subsequence that matches the pattern.
All the text nodes or attribute values of the node list are concatenated before the test is executed.
nl
- the node list to be testedpattern
- the regular expression
test(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static boolean test(org.w3c.dom.NodeList nl, java.lang.String pattern, java.lang.String flags)
test
function returns true if the node list given
as the first parameter matches the regular expression
given as the second parameter.
The input sequence is scanned looking for the first subsequence that matches the pattern.
All the text nodes or attribute values of the node list are concatenated before the test is executed.
nl
- the node list to be testedpattern
- the regular expressionflags
- the flags to be used ("g","i")
test(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static boolean test(java.lang.String input, java.lang.String pattern)
test
function returns true if the string given
as the first parameter matches the regular expression
given as the second parameter.
The input sequence is scanned looking for the first subsequence that matches the pattern.
The second parameter is a regular expression that
follows the regular expression syntax of the
java.util.regex
package of the
Java 2 Platform, Standard Edition (since 1.4).
input
- the string to be testedpattern
- the regular expression
test(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static boolean test(java.lang.String input, java.lang.String pattern, java.lang.String flags)
test
function returns true if the string given
as the first parameter matches the regular expression
given as the second parameter.
The input sequence is scanned looking for the first subsequence that matches the pattern.
The second parameter is a regular expression that
follows the regular expression syntax of the
java.util.regex
package of the
Java 2 Platform, Standard Edition (since 1.4).
The third parameter is a string consisting of flags
to be used by test
. If a character is present than
the flag is true. Possible flags are:
g: global test - has no effect on this function and
is just retained for consistency with Regexp.match
and Regexp.replace
.
i: case insenitive - the regular expression is treated
as case insensitiv. The default uses case senitive regular
expressions.
input
- the string to be testedpattern
- the regular expressionflags
- the flags to be used ("g","i")
public static org.w3c.dom.NodeList match(org.w3c.dom.NodeList nl, java.lang.String pattern)
match
function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter node list, captured by the
second parameter regular expression
All the text nodes or attributes of the elements or
attribute values of the node list are concatenated
before the match is executed.
nl
- the node list to be matchedpattern
- the regular expression
match(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static org.w3c.dom.NodeList match(org.w3c.dom.NodeList nl, java.lang.String pattern, java.lang.String flags)
match
function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter node list, captured by the
second parameter regular expression.
All the text nodes or attribute values of the node list
are concatenated before match is executed.
nl
- the node list to be matchedpattern
- the regular expressionflags
- the flags to be used ("g","i")
match(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static org.w3c.dom.NodeList match(java.lang.String input, java.lang.String pattern)
match
function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter string, captured by the
second parameter regular expression.
input
- the string to be matchedpattern
- the regular expression
match(java.lang.String input, java.lang.String pattern, java.lang.String flags)
public static org.w3c.dom.NodeList match(java.lang.String input, java.lang.String pattern, java.lang.String flags)
match
function returns a node set of
match elements, for each string value that is equal to a
portion of the first parameter string, captured by the
second parameter regular expression
The second parameter is a regular expression that
follows the regular expression syntax of the
java.util.regex
package of the
Java 2 Platform, Standard Edition (since 1.4).
The third parameter is a string consisting of flags
to be used by match
. If a character is present than
the flag is true. Possible flags are:
g: global match - the submatches of all the matches in the string are returned. The default (character is not present) returns only the submatches of the first match in the string. i: case insenitive - the regular expression is treated as case insensitiv. The default uses case senitive regular expressions.
input
- the string to be matchedpattern
- the regular expressionflags
- the flags to be used ("g","i")
public static java.lang.String replace(org.w3c.dom.NodeList nl, java.lang.String pattern, java.lang.String flags, java.lang.String replace)
replace
function returns a string with parts
of the string given as the first parameter that match
second parameter regular expression replaced with another string.
nl
- the node list to be matched and replacedpattern
- the regular expressionflags
- the flags to be used ("g","i")replace
- the replacing string
replace(java.lang.String input, java.lang.String pattern, java.lang.String flags java.lang.String repStr)
public static java.lang.String replace(java.lang.String input, java.lang.String pattern, java.lang.String flags, java.lang.String replace)
replace
function returns a string with parts
of the string given as the first parameter that match
second parameter regular expression replaced with another string.
The second parameter is a regular expression that
follows the regular expression syntax of the
java.util.regex
package of the
Java 2 Platform, Standard Edition (since 1.4).
The third parameter is a string consisting of flags
to be used by
g: global match - the submatches of all the matches
in the string are returned. The default (character is not present)
returns only the submatches of the first match in the string.
i: case insenitive - the regular expression is treated
as case insensitiv. The default uses case senitive regular
expressions.
The fourth parameter is the string to replace the matched parts.
replace. If a character is present than
the flag is true. Possible flags are:
input
- the string to be matched and replacedpattern
- the regular expressionflags
- the flags to be used ("g","i")replace
- the replacing string
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |