jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gl...@locus.apache.org
Subject cvs commit: jakarta-taglibs/regexp/doc/web index.html
Date Mon, 06 Nov 2000 13:51:48 GMT
glenn       00/11/06 05:51:48

  Modified:    regexp/doc/web index.html
  Log:
  Cleanup for release
  
  Revision  Changes    Path
  1.2       +863 -52   jakarta-taglibs/regexp/doc/web/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/jakarta-taglibs/regexp/doc/web/index.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- index.html	2000/10/22 01:32:05	1.1
  +++ index.html	2000/11/06 13:51:47	1.2
  @@ -1,52 +1,863 @@
  -<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
  -<html>
  -<head>
  -   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  -   <meta name="GENERATOR" content="Mozilla/4.74 [en] (X11; U; FreeBSD 3.4-RELEASE i386)
[Netscape]">
  -   <title>Documentation for the REGEXP Tag Library</title>
  -</head>
  -<body text="#000000" bgcolor="#FFFFFF" link="#0000EE" vlink="#551A8B" alink="#FF0000">
  -
  -<center>
  -<h1>
  -Documentation for the REGEXP Tag Library</h1></center>
  -
  -<h3>
  -1. INTRODUCTION</h3>
  -The REGEXP custom tag library contains tags which can be used to perform
  -Perl syntax regular expressions.
  -<h3>
  -2. PREREQUISITE&nbsp;SOFTWARE</h3>
  -This custom tag library requires no software other than a servlet container
  -that supports the JavaServer Pages Specification, version 1.1 and the
  -Jakarta ORO regular expression jar file.
  -<h3>
  -3. CONFIGURATION INFORMATION</h3>
  -Follow these steps to configure your web application with this tag library:
  -<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copy the tag library descriptor
file
  -(regexp/regexp.tld) to the /WEB-INF subdirectory of your web application.
  -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Copy the tag library JAR file
(regexp/regexp.jar)
  -to the /WEB-INF/lib subdirectory of your web application.
  -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Add a &lt;taglib> element
to your web
  -application deployment descriptor in /WEB-INF/web.xml like this:
  -<p>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;taglib>
  -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  -&lt;taglib-uri>http://jakarta.apache.org/taglibs/regexp-1.0&lt;/taglib-uri>
  -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  -&lt;taglib-location>/WEB-INF/regexp.tld&lt;/taglib-location>
  -<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&lt;/taglib>
  -<p>To use the tags from this library in your JSP pages, add the following
  -directive at the top of each page:
  -<p>&nbsp;&nbsp;&nbsp; &lt;%@ taglib uri="http://jakarta.apache.org/taglibs/regexp-1.0"
prefix="rx" %>
  -<p>where "rx" is the tag name prefix you wish to use for tags from this
  -library. You can change this value to any prefix you like.
  -<h3>
  -4. TAG DOCUMENTATION</h3>
  -This custom tag library includes a number of tags which are documented
  -using <a href="javadoc/index.html">javadocs</a>.
  -<h3>
  -5. USAGE EXAMPLES</h3>
  -See the example application (regexp/regexp-examples.war) for examples
  -of the usage of the tags from this custom tag library.
  -</body>
  -</html>
  +<HTML>
  +
  +<HEAD>
  + <TITLE>Jakarta Project: REGEXP JSP Tag Library</TITLE>
  +</HEAD>
  +
  +<BODY BGCOLOR="white">
  +<CENTER>
  +<H1>Jakarta Project: REGEXP JSP Tag Library</H1>
  +<H3>Version 1.0</H3>
  +</CENTER>
  +
  +<H3>Table of Contents</H3>
  +<A HREF="#overview">Overview</A><BR>
  +<A HREF="#requirements">Requirements</A><BR>
  +<A HREF="#config">Configuration</A><BR>
  +<A HREF="#summary">Tag Summary</A><BR>
  +<A HREF="#reference">Tag Reference</A><BR>
  +<A HREF="#examples">Examples</A><BR>
  +<A HREF="#javadocs">Javadocs</A><BR>
  +<A HREF="#history">Revision History</A><BR>
  +<BR>
  +
  +<A NAME="overview"><H3>Overview</H3></A>
  +<P>The REGEXP custom tag library contains tags which can be used to
  +perform Perl syntax regular expressions.</P>
  +<P>
  +These tags implement the 3 most common Perl5 operations
  +involving regular expressions:
  + <ul>
  + <li> [m]/pattern/[i][m][s][x]
  + <li> s/pattern/replacement/[g][i][m][o][s][x]
  + <li> and split()
  + </ul>
  +As with Perl, any non-alphanumeric character can be used in lieu of
  +the slashes.
  +</P>
  +<P>
  +For more information on how to use Perl syntax regular expressions
  +you can start at the 
  +<a href="http://www.perl.com/pub/doc/manual/html/pod/perlre.html">
  +Perl Regular Expression</a> page.  If you 
  +<a href="http://www.google.com/search?q=perl+regular+expression">search</a>
  +the web you can find thousands of web sites documenting how to use perl regular
  +expressions.
  +</P>
  +
  +<A NAME="requirements"><H3>Requirements</H3></A>
  +<P>This custom tag library requires no software other than a servlet container
  +that supports the JavaServer Pages Specification, version 1.1.</P>
  +
  +<A NAME="config"><H3>Configuration</H3></A>
  +<P>Follow these steps to configure your web application with this tag library:</P>
  +<UL>
  +<LI>Copy the tag library descriptor file (regexp/regexp.tld) to the /WEB-INF
  +subdirectory of your web application.</LI>
  +<LI>Copy the tag library JAR file (regexp/regexp.jar) to the /WEB-INF/lib
  +subdirectory of your web application.</LI>
  +<LI>Add a &lt;taglib&gt; element to your web application deployment descriptor
  +in /WEB-INF/web.xml like this:<BR>
  +<BR>
  +<PRE>
  +&lt;taglib&gt;
  +  &lt;taglib-uri&gt;http://jakarta.apache.org/taglibs/regexp-1.0&lt;/taglib-uri&gt;
  +  &lt;taglib-location&gt;/WEB-INF/regexp.tld&lt;/taglib-location&gt;
  +&lt;/taglib&gt;
  +</PRE>
  +</LI>
  +</UL>
  +<P>To use the tags from this library in your JSP pages, add the following
  +directive at the top of each page: </P>
  +<PRE>
  +&lt;%@ taglib uri=&quot;http://jakarta.apache.org/taglibs/regexp-1.0&quot;
prefix=&quot;rx&quot; %&gt;
  +</PRE>
  +<P>where &quot;<I>rx</I>&quot; is the tag name prefix you wish
to use for
  +tags from this library. You can change this value to any prefix you like.
  +For the examples below the prefix &quot;<B>rx</B>&quot; is used.</P>
  +
  +<A NAME="summary"><H3>Tag Summary</H3></A>
  +<TABLE>
  + <TR>
  +  <TD><A HREF="#regexp">regexp</A></TD>
  +  <TD>Create a regular expression script variable</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#text">text</A></TD>
  +  <TD>Create a text string script variable for use with a regexp</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#existsmatch">existsmatch</A></TD>
  +  <TD>Uses a regexp to determine if a match exists in the text</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#substitute">substitute</A></TD>
  +  <TD>Performs a string substitution on text using a regexp</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#split">split</A></TD>
  +  <TD>Implements a perl style split on the text</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#match">match</A></TD>
  +  <TD>Loops through each match found in text by a regexp</TD>
  + </TR>
  + <TR>
  +  <TD><A HREF="#group">group</A></TD>
  +  <TD>Get the value of a single parenthesized group within a single match</TD>
  + </TR>
  +</TABLE>
  +
  +<A NAME="reference"><H3>Tag Reference</H3></A>
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%"  CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="regexp">&nbsp;regexp</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Create a regular expression script variable.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">JSP</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">Yes, available from end of tag to end of page</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">The body of the tag is assigned to a script variable
  +      as a regular expression.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;id</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Script variable id for use with standard
  +         <B>jsp:getProperty</B> tag and as an attribute to other tags
  +         in this tag library.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD COLSPAN=2 WIDTH="100%"><B>Properties</B></TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="60%">Name</TD>
  +        <TD WIDTH="20%">Get</TD>
  +        <TD WIDTH="20%">Set</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;regexp</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Returns the text of the regular expression.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- create the match regexp "m/test1/mi" --%&gt;
  +&lt;rx:regexp id="rx1"&gt;m/test1/mi&lt;/rx:regexp&gt;
  +The regular expression is:
  +&lt;jsp:getProperty name="rx1" property="regexp"/&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%"  CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="text">&nbsp;text</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Create a text string script variable for use with a regexp.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">JSP</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">Yes, from end of tag to end of page.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">The body of the tag is assigned to a script variable
  +      as a text string.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;id</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Script variable id for use with standard
  +         <B>jsp:getProperty</B> tag and as an attribute to other tags
  +         in this tag library.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD COLSPAN=2 WIDTH="100%"><B>Properties</B></TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="60%">Name</TD>
  +        <TD WIDTH="20%">Get</TD>
  +        <TD WIDTH="20%">Set</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;text</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Returns the text string.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- create a text script variable --%&gt;
  +&lt;rx:text id="tx1"&gt;This is a test string.&lt;/rx:text&gt;
  +The text string is:
  +&lt;jsp:getProperty name="tx1" property="text"/&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="existsmatch">&nbsp;existsmatch</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Uses a regexp to determine if a match exists in the text.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">JSP</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">No</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR> 
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;regexp</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Script variable id of <b>regexp</b> to use for
match.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;text</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD> 
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Script variable id of <b>text</b> to check for
a match.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;value</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD> 
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">If value is set to false the existsmatch tag includes body
  + of tag if a match does not exist.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Properties</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- create the match regexp "m/test1/mi" --%&gt;
  +&lt;rx:regexp id="rx1"&gt;m/test1/mi&lt;/rx:regexp&gt;
  +&lt;%-- set the text to match on --%&gt;
  +&lt;rx:text id="test"&gt;
  +This is a
  +test of regular expression matching.
  +&lt;/rx:text&gt;
  +See if a match exists...&lt;br&gt;
  +&lt;rx:existsmatch regexp="rx1" text="test"&gt;
  +   A match was found!&lt;br&gt;
  +&lt;/rx:existsmatch&gt;
  +&lt;rx:existsmatch regexp="rx1" text="test" value="false"&gt;
  +   A match was not found!&lt;br&gt;
  +&lt;/rx:existsmatch&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="substitute">&nbsp;substitute</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Performs a string substitution on text using a regexp.
  +   The text is output after the substitution has been applied.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">empty</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">No</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +	<TD WIDTH="40%">Name</TD>
  +	<TD WIDTH="20%">Required</TD>
  +	<TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +	<TD WIDTH="40%"><B>&nbsp;regexp</B></TD>
  +	<TD WIDTH="20%">&nbsp;Yes</TD>
  +	<TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +	<TD COLSPAN="3">Script variable id of <b>regexp</b> to use for substitute.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +	<TD WIDTH="40%"><B>&nbsp;text</B></TD>
  +	<TD WIDTH="20%">&nbsp;Yes</TD>
  +	<TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +	<TD COLSPAN="3">Script variable id of <b>text</b> to perform substitution
on.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Properties</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +	<PRE>
  +&lt;%-- create the substitute regexp "s/test1/test2/gmi" --%&gt;
  +&lt;rx:regexp id="rx2"&gt;s/test1/test2/gmi&lt;/rx:regexp&gt;
  +&lt;%-- set the text to match on --%&gt;
  +&lt;rx:text id="test"&gt;
  +This is
  +test1 of regular expression substitution.
  +&lt;/rx:text&gt;
  +Here is the text after substitution...&lt;br&gt;
  +&lt;rx:substitute regexp="rx2" text="test"/&gt;
  +        </PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="split">&nbsp;split</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Implements a perl style split on the text. You can use a <b>regexp</b>
  +   to split the text, the default is to split on white space. Loops through each string
  +   split out of the text.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">JSP</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">Yes, available only within tag body.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;id</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Script variable id for use with standard
  +         <B>jsp:getProperty</B> tag</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;regexp</B></TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>   
  +       <TR>    
  +        <TD COLSPAN="3">Script variable id of <b>regexp</b> to use for
split.</TD>
  +       </TR>   
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;text</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>   
  +       <TR>    
  +        <TD COLSPAN="3">Script variable id of <b>text</b> to perform
split on.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;limit</B></TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>  
  +       <TR>   
  +        <TD COLSPAN="3">Set a limit for the number of strings split out from text.</TD>
      
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR> 
  +     <TD COLSPAN=2 WIDTH="100%"><B>Properties</B></TD>
  +    </TR>
  +    <TR> 
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="60%">Name</TD>
  +        <TD WIDTH="20%">Get</TD>
  +        <TD WIDTH="20%">Set</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;split</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Returns the string split out from text.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- set the text to split --%&gt;
  +&lt;rx:text id="test"&gt;
  +This is
  +test1 of a regular expression split,
  +on whitespace, and then on a comma.
  +&lt;/rx:text&gt;
  +&lt;ul&gt;
  +&lt;rx:split id="split" text="test"&gt;
  + &lt;jsp:getProperty name="split" property="split"/&gt;&lt;br&gt;
  +&lt;/rx:split&gt;
  +&lt;/ul&gt;
  +&lt;%-- now split the text using a comma with limit of 2 --%&gt;
  +&lt;rx:regexp id="rx3"&gt;/,/m&lt;/rx:regexp&gt;
  +&lt;ul&gt;     
  +&lt;rx:split id="split" text="test" regexp="rx3" limit="2"&gt;
  + &lt;jsp:getProperty name="split" property="split"/&gt;&lt;br&gt;
  +&lt;/rx:split&gt;
  +&lt;/ul&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%"  CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="match">&nbsp;match</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="3">Loops through each match found in text by a regexp.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">JSP</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">Yes, available only within tag body.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;id</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Script variable id for use with standard
  +         <B>jsp:getProperty</B> tag.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;regexp</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Script variable id of <b>regexp</b> to use for
match.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;text</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Script variable id of <b>text</b> to perform
match on.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD COLSPAN=2 WIDTH="100%"><B>Properties</B></TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="60%">Name</TD>
  +        <TD WIDTH="20%">Get</TD>
  +        <TD WIDTH="20%">Set</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;match</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Returns the entire string that was matched on.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;prematch</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="20%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Returns the string preceding the current match.</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="60%"><B>&nbsp;postmatch</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>    
  +        <TD WIDTH="20%">&nbsp;No</TD> 
  +       </TR>
  +       <TR> 
  +        <TD COLSPAN="3">Returns the string after the current match.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- set the text to perform match --%&gt;
  +&lt;rx:text id="test"&gt;
  +This is
  +test1 of a regular expression match,
  +on words that start with 'i' like item and
  +index.
  +&lt;/rx:text&gt;
  +&lt;%-- create the match regexp "m/\si[^\s]*\s/mi" --%&gt;
  +&lt;rx:regexp id="rx4"&gt;m/\si[^\s]*\s/mi&lt;/rx:regexp&gt;
  +&lt;pre&gt;
  +&lt;rx:match id="mtch" text="test" regexp="rx4"&gt;
  + Match: &lt;jsp:getProperty name="mtch" property="match"/&gt;&lt;br&gt;
  +  Pre Match: &lt;jsp:getProperty name="mtch" property="prematch"/&gt;&lt;br&gt;
  +  Post Match: &lt;jsp:getProperty name="mtch" property="postmatch"/&gt;&lt;br&gt;
  +&lt;/rx:match&gt;
  +&lt;/pre&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<TABLE BORDER="0" WIDTH="90%" CELLPADDING="3" CELLSPACING="0">
  + <TR>
  +  <TD COLSPAN="2">
  +   <TABLE BORDER="0" BGCOLOR="#CCCCCC" WIDTH="100%" CELLSPACING="0">
  +    <TR>
  +     <TD><B><FONT SIZE="+1"><A NAME="group">&nbsp;group</A></FONT></B></TD>
  +     <TD ALIGN="RIGHT">Availability: version 1.0&nbsp;</TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  + <TR>
  +  <TD COLSPAN="2">Get the value of a single parenthesized group within a single match.</TD>
  + </TR>
  + <TR>
  +  <TD WIDTH="2%">&nbsp;</TD>
  +  <TD WIDTH="98%">
  +   <TABLE BORDER="0" WIDTH="100%">
  +    <TR>
  +     <TD WIDTH="20%"><B>Tag Body</B></TD>
  +     <TD WIDTH="80%">empty</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Script Variable</B></TD>
  +     <TD WIDTH="80%">No</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Restrictions</B></TD>
  +     <TD WIDTH="80%">Must be nested inside a <b>match</b> tag.</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Attributes</B></TD>
  +     <TD WIDTH="80%">&nbsp;</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%">&nbsp;</TD>
  +     <TD WIDTH="80%">
  +      <TABLE BORDER="0" WIDTH="100%">
  +       <TR>
  +        <TD WIDTH="40%">Name</TD>
  +        <TD WIDTH="20%">Required</TD>
  +        <TD WIDTH="40%">Runtime Expression Evaluation</TD>
  +       </TR>
  +       <TR BGCOLOR="#CCCCCC">
  +        <TD WIDTH="40%"><B>&nbsp;number</B></TD>
  +        <TD WIDTH="20%">&nbsp;Yes</TD>
  +        <TD WIDTH="40%">&nbsp;No</TD>
  +       </TR>
  +       <TR>
  +        <TD COLSPAN="3">Parenthesised group number to get from match.</TD>
  +       </TR>
  +      </TABLE>
  +     </TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%"><B>Properties</B></TD>
  +     <TD WIDTH="80%">None</TD>
  +    </TR>
  +    <TR>
  +     <TD WIDTH="20%" VALIGN="TOP"><B>Example</B></TD>
  +     <TD WIDTH="80%"><BR>
  +<PRE>
  +&lt;%-- set the text to perform match --%&gt;
  +&lt;rx:text id="test"&gt;
  +This is
  +test1 of a regular expression match,
  +on words that start with 'i' like item and
  +index, the group tag will be used to get the
  +next word after the word starting with 'i'.
  +&lt;/rx:text&gt;
  +&lt;%-- create the match regexp "m/\si[^\s]*\s([^\s]+)/mi" --%&gt;        
  +&lt;rx:regexp id="rx4"&gt;m/\si[^\s]*\s([^\s]+)/mi&lt;/rx:regexp&gt;
  +&lt;pre&gt;
  +&lt;rx:match id="mtch" text="test" regexp="rx4"&gt;
  + Match: &lt;jsp:getProperty name="mtch" property="match"/&gt;&lt;br&gt;
  +  Parenthesized Group 1: &lt;rx:group number="1"/&gt;
  +&lt;/rx:match&gt;
  +&lt;/pre&gt;
  +</PRE>
  +     </TD>
  +    </TR>
  +   </TABLE>
  +  </TD>
  + </TR>
  +</TABLE>
  +
  +<A NAME="examples"><H3>Examples</H3></A>
  +<P>See the example application regexp-examples.war for examples of the usage
  +of the tags from this custom tag library.</P>
  +
  +<A NAME="javadocs"><H3>Java Docs</H3></A>
  +<P>Java programmers can view the java class documentation for this tag library
  +as <A HREF="javadoc/index.html">javadocs</A>.</P>
  +
  +<A NAME="history"><H3>Revision History</H3></A>
  +<P>Review the complete <A HREF="changes.html">revision history</A> of
this tag
  +library.</P>
  +</BODY>
  +</HTML>
  
  
  

Mime
View raw message