<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:19 GMT 2011 --> <TITLE> JRegularExpression </TITLE> <META NAME="date" CONTENT="2011-12-09"> <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> <SCRIPT type="text/javascript"> function windowTitle() { if (location.href.indexOf('is-external=true') == -1) { parent.document.title="JRegularExpression"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <A NAME="navbar_top"><!-- --></A> <A HREF="#skip-navbar_top" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/sf/saxon/functions/regex/JRegexIterator.html" title="class in net.sf.saxon.functions.regex"><B>PREV CLASS</B></A> <A HREF="../../../../../net/sf/saxon/functions/regex/JTokenIterator.html" title="class in net.sf.saxon.functions.regex"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?net/sf/saxon/functions/regex/JRegularExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="JRegularExpression.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_top"></A> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> net.sf.saxon.functions.regex</FONT> <BR> Class JRegularExpression</H2> <PRE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A> <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.saxon.functions.regex.JRegularExpression</B> </PRE> <DL> <DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></DD> </DL> <HR> <DL> <DT><PRE>public class <B>JRegularExpression</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></DL> </PRE> <P> A compiled regular expression implemented using the Java JDK regex package <P> <P> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#net.sf.saxon.functions.regex.JRegularExpression">Serialized Form</A></DL> <HR> <P> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Field Summary</B></FONT></TH> </TR> </TABLE> <A NAME="fields_inherited_from_class_net.sf.saxon.functions.regex.RegularExpression"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Fields inherited from interface net.sf.saxon.functions.regex.<A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#EXPAND_COMPLEMENT_BLOCKS">EXPAND_COMPLEMENT_BLOCKS</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#JAVA_SYNTAX">JAVA_SYNTAX</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#XML11">XML11</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#XPATH20">XPATH20</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#XPATH30">XPATH30</A>, <A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#XSD11">XSD11</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#JRegularExpression(java.lang.CharSequence, int, int, java.util.List)">JRegularExpression</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> regex, int options, int flagBits, <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../net/sf/saxon/functions/regex/RegexSyntaxException.html" title="class in net.sf.saxon.functions.regex">RegexSyntaxException</A>> warnings)</CODE> <BR> Create (compile) an XSD/XPath regular expression</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#JRegularExpression(java.lang.String, int)">JRegularExpression</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> javaRegex, int flagBits)</CODE> <BR> Create a regular expression, starting with an already-translated Java regex.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> <B>Method Summary</B></FONT></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../net/sf/saxon/functions/regex/RegexIterator.html" title="interface in net.sf.saxon.functions.regex">RegexIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#analyze(java.lang.CharSequence)">analyze</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</CODE> <BR> Use this regular expression to analyze an input string, in support of the XSLT analyze-string instruction.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#containsMatch(java.lang.CharSequence)">containsMatch</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</CODE> <BR> Determine whether the regular expression contains a match for a given string</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#getFlagBits()">getFlagBits</A></B>()</CODE> <BR> Get the flag bits as used by the Java regular expression engine</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#getJavaRegularExpression()">getJavaRegularExpression</A></B>()</CODE> <BR> Get the Java regular expression (after translation from an XPath regex, but before compilation)</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static void</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#main(java.lang.String[])">main</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] args)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#matches(java.lang.CharSequence)">matches</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</CODE> <BR> Determine whether the regular expression match a given string in its entirety</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#replace(java.lang.CharSequence, java.lang.CharSequence)">replace</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> replacement)</CODE> <BR> Replace all substrings of a supplied input string that match the regular expression with a replacement string.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>static int</CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#setFlags(java.lang.CharSequence)">setFlags</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> inFlags)</CODE> <BR> Set the Java flags from the supplied XPath flags.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html#tokenize(java.lang.CharSequence)">tokenize</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</CODE> <BR> Use this regular expression to tokenize an input string.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TH> </TR> </TABLE> <A NAME="JRegularExpression(java.lang.String, int)"><!-- --></A><H3> JRegularExpression</H3> <PRE> public <B>JRegularExpression</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> javaRegex, int flagBits)</PRE> <DL> <DD>Create a regular expression, starting with an already-translated Java regex. NOTE: this constructor is called from compiled XQuery code <P> <DL> <DT><B>Parameters:</B><DD><CODE>javaRegex</CODE> - the regular expression after translation to Java notation<DD><CODE>flagBits</CODE> - the option bits, derived from the user-specified flags</DL> </DL> <HR> <A NAME="JRegularExpression(java.lang.CharSequence, int, int, java.util.List)"><!-- --></A><H3> JRegularExpression</H3> <PRE> public <B>JRegularExpression</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> regex, int options, int flagBits, <A HREF="http://download.oracle.com/javase/6/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</A><<A HREF="../../../../../net/sf/saxon/functions/regex/RegexSyntaxException.html" title="class in net.sf.saxon.functions.regex">RegexSyntaxException</A>> warnings) throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Create (compile) an XSD/XPath regular expression <P> <DL> <DT><B>Parameters:</B><DD><CODE>regex</CODE> - the source text of the regular expression, in XML Schema or XPath syntax<DD><CODE>options</CODE> - flags indicting the regex dialect accepted<DD><CODE>flagBits</CODE> - the flags argument translated to the Java bit-significant integer representation<DD><CODE>warnings</CODE> - a list to contain any warnings generated. If no list is supplied, this indicates that the caller is not interested in knowing about any warnings. <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the syntax of the regular expression or flags is incorrect</DL> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> <B>Method Detail</B></FONT></TH> </TR> </TABLE> <A NAME="getJavaRegularExpression()"><!-- --></A><H3> getJavaRegularExpression</H3> <PRE> public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A> <B>getJavaRegularExpression</B>()</PRE> <DL> <DD>Get the Java regular expression (after translation from an XPath regex, but before compilation) <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the regular expression in Java notation</DL> </DD> </DL> <HR> <A NAME="getFlagBits()"><!-- --></A><H3> getFlagBits</H3> <PRE> public int <B>getFlagBits</B>()</PRE> <DL> <DD>Get the flag bits as used by the Java regular expression engine <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the flag bits</DL> </DD> </DL> <HR> <A NAME="analyze(java.lang.CharSequence)"><!-- --></A><H3> analyze</H3> <PRE> public <A HREF="../../../../../net/sf/saxon/functions/regex/RegexIterator.html" title="interface in net.sf.saxon.functions.regex">RegexIterator</A> <B>analyze</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</PRE> <DL> <DD>Use this regular expression to analyze an input string, in support of the XSLT analyze-string instruction. The resulting RegexIterator provides both the matching and non-matching substrings, and allows them to be distinguished. It also provides access to matched subgroups. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#analyze(java.lang.CharSequence)">analyze</A></CODE> in interface <CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>input</CODE> - the character string to be analyzed using the regular expression <DT><B>Returns:</B><DD>an iterator over matched and unmatched substrings</DL> </DD> </DL> <HR> <A NAME="containsMatch(java.lang.CharSequence)"><!-- --></A><H3> containsMatch</H3> <PRE> public boolean <B>containsMatch</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</PRE> <DL> <DD>Determine whether the regular expression contains a match for a given string <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#containsMatch(java.lang.CharSequence)">containsMatch</A></CODE> in interface <CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>input</CODE> - the string to match <DT><B>Returns:</B><DD>true if the string matches, false otherwise</DL> </DD> </DL> <HR> <A NAME="matches(java.lang.CharSequence)"><!-- --></A><H3> matches</H3> <PRE> public boolean <B>matches</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</PRE> <DL> <DD>Determine whether the regular expression match a given string in its entirety <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#matches(java.lang.CharSequence)">matches</A></CODE> in interface <CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>input</CODE> - the string to match <DT><B>Returns:</B><DD>true if the string matches, false otherwise</DL> </DD> </DL> <HR> <A NAME="replace(java.lang.CharSequence, java.lang.CharSequence)"><!-- --></A><H3> replace</H3> <PRE> public <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> <B>replace</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> replacement) throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Replace all substrings of a supplied input string that match the regular expression with a replacement string. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#replace(java.lang.CharSequence, java.lang.CharSequence)">replace</A></CODE> in interface <CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>input</CODE> - the input string on which replacements are to be performed<DD><CODE>replacement</CODE> - the replacement string in the format of the XPath replace() function <DT><B>Returns:</B><DD>the result of performing the replacement <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the replacement string is invalid</DL> </DD> </DL> <HR> <A NAME="tokenize(java.lang.CharSequence)"><!-- --></A><H3> tokenize</H3> <PRE> public <A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A> <B>tokenize</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> input)</PRE> <DL> <DD>Use this regular expression to tokenize an input string. <P> <DD><DL> <DT><B>Specified by:</B><DD><CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html#tokenize(java.lang.CharSequence)">tokenize</A></CODE> in interface <CODE><A HREF="../../../../../net/sf/saxon/functions/regex/RegularExpression.html" title="interface in net.sf.saxon.functions.regex">RegularExpression</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>input</CODE> - the string to be tokenized <DT><B>Returns:</B><DD>a SequenceIterator containing the resulting tokens, as objects of type StringValue</DL> </DD> </DL> <HR> <A NAME="setFlags(java.lang.CharSequence)"><!-- --></A><H3> setFlags</H3> <PRE> public static int <B>setFlags</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/CharSequence.html?is-external=true" title="class or interface in java.lang">CharSequence</A> inFlags) throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE> <DL> <DD>Set the Java flags from the supplied XPath flags. <P> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>inFlags</CODE> - the flags as a string, e.g. "im" <DT><B>Returns:</B><DD>the flags as a bit-significant integer <DT><B>Throws:</B> <DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE> - if the supplied value is invalid</DL> </DD> </DL> <HR> <A NAME="main(java.lang.String[])"><!-- --></A><H3> main</H3> <PRE> public static void <B>main</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>[] args)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> </DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <A NAME="navbar_bottom"><!-- --></A> <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../net/sf/saxon/functions/regex/JRegexIterator.html" title="class in net.sf.saxon.functions.regex"><B>PREV CLASS</B></A> <A HREF="../../../../../net/sf/saxon/functions/regex/JTokenIterator.html" title="class in net.sf.saxon.functions.regex"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html?net/sf/saxon/functions/regex/JRegularExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="JRegularExpression.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--> </SCRIPT> <NOSCRIPT> <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> </NOSCRIPT> </FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <A NAME="skip-navbar_bottom"></A> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> Copyright (c) 2004-2011 Saxonica Limited. All rights reserved. </BODY> </HTML>