<!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> RegularExpression </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="RegularExpression"; } } </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/RegexTranslator.Range.html" title="class in net.sf.saxon.functions.regex"><B>PREV CLASS</B></A> <A HREF="../../../../../net/sf/saxon/functions/regex/UnicodeBlocks.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/RegularExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="RegularExpression.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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> Interface RegularExpression</H2> <DL> <DT><B>All Superinterfaces:</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></DD> </DL> <DL> <DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../net/sf/saxon/functions/regex/JRegularExpression.html" title="class in net.sf.saxon.functions.regex">JRegularExpression</A></DD> </DL> <HR> <DL> <DT><PRE>public interface <B>RegularExpression</B><DT>extends <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></DL> </PRE> <P> This interface represents a compiled regular expression <P> <P> <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> <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/RegularExpression.html#EXPAND_COMPLEMENT_BLOCKS">EXPAND_COMPLEMENT_BLOCKS</A></B></CODE> <BR> </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/RegularExpression.html#JAVA_SYNTAX">JAVA_SYNTAX</A></B></CODE> <BR> </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/RegularExpression.html#XML11">XML11</A></B></CODE> <BR> </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/RegularExpression.html#XPATH20">XPATH20</A></B></CODE> <BR> </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/RegularExpression.html#XPATH30">XPATH30</A></B></CODE> <BR> </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/RegularExpression.html#XSD11">XSD11</A></B></CODE> <BR> </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/RegularExpression.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/RegularExpression.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 of a given string</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/RegularExpression.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/RegularExpression.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> <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/RegularExpression.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> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_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>Field Detail</B></FONT></TH> </TR> </TABLE> <A NAME="XML11"><!-- --></A><H3> XML11</H3> <PRE> static final int <B>XML11</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.XML11">Constant Field Values</A></DL> </DL> <HR> <A NAME="XPATH20"><!-- --></A><H3> XPATH20</H3> <PRE> static final int <B>XPATH20</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.XPATH20">Constant Field Values</A></DL> </DL> <HR> <A NAME="XPATH30"><!-- --></A><H3> XPATH30</H3> <PRE> static final int <B>XPATH30</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.XPATH30">Constant Field Values</A></DL> </DL> <HR> <A NAME="JAVA_SYNTAX"><!-- --></A><H3> JAVA_SYNTAX</H3> <PRE> static final int <B>JAVA_SYNTAX</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.JAVA_SYNTAX">Constant Field Values</A></DL> </DL> <HR> <A NAME="EXPAND_COMPLEMENT_BLOCKS"><!-- --></A><H3> EXPAND_COMPLEMENT_BLOCKS</H3> <PRE> static final int <B>EXPAND_COMPLEMENT_BLOCKS</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.EXPAND_COMPLEMENT_BLOCKS">Constant Field Values</A></DL> </DL> <HR> <A NAME="XSD11"><!-- --></A><H3> XSD11</H3> <PRE> static final int <B>XSD11</B></PRE> <DL> <DL> <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.functions.regex.RegularExpression.XSD11">Constant Field Values</A></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="matches(java.lang.CharSequence)"><!-- --></A><H3> matches</H3> <PRE> 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> </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="containsMatch(java.lang.CharSequence)"><!-- --></A><H3> containsMatch</H3> <PRE> 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 of a given string <P> <DD><DL> </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="tokenize(java.lang.CharSequence)"><!-- --></A><H3> tokenize</H3> <PRE> <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> </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="analyze(java.lang.CharSequence)"><!-- --></A><H3> analyze</H3> <PRE> <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> </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="replace(java.lang.CharSequence, java.lang.CharSequence)"><!-- --></A><H3> replace</H3> <PRE> <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> </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> <!-- ========= 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/RegexTranslator.Range.html" title="class in net.sf.saxon.functions.regex"><B>PREV CLASS</B></A> <A HREF="../../../../../net/sf/saxon/functions/regex/UnicodeBlocks.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/RegularExpression.html" target="_top"><B>FRAMES</B></A> <A HREF="RegularExpression.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <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>