1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- Content Stylesheet for Site -->
<!-- start the processing -->
<!-- ====================================================================== -->
<!-- GENERATED FILE, DO NOT EDIT, EDIT THE XML FILE IN xdocs INSTEAD! -->
<!-- Main Page Section -->
<!-- ====================================================================== -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<meta name="author" value="Daniel Savarese">
<meta name="email" value="$au.getAttributeValue("email")">
<title>Jakarta ORO - Demonstration Applet</title>
</head>
<body bgcolor="#ffffff" text="#000000" link="#525D76">
<table border="0" width="100%" cellspacing="0">
<!-- TOP IMAGE -->
<tr>
<td align="left">
<a href="http://jakarta.apache.org"><img src="http://jakarta.apache.org/images/jakarta-logo.gif" border="0"/></a>
</td>
<td align="right">
<a href="http://jakarta.apache.org/oro/"><img src="./images/logo.gif" alt="Jakarta-ORO" border="0"/></a>
</td>
</tr>
</table>
<table border="0" width="100%" cellspacing="4">
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr>
<!-- LEFT SIDE NAVIGATION -->
<td width="20%" valign="top" nowrap="true">
<p><strong>About</strong></p>
<ul>
<li> <a href="./index.html">Overview</a>
</li>
<li> <a href="./devplan-2.0.html">Development plan</a>
</li>
<li> <a href="./status.html">Status</a>
</li>
<li> <a href="./bugs.html">Issue tracking</a>
</li>
<li> <a href="http://cvs.apache.org/viewcvs/jakarta-oro/">CVS</a>
</li>
<li> <a href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-oro/CHANGES?content-type=text/plain">Changes</a>
</li>
<li> <a href="http://cvs.apache.org/viewcvs/~checkout~/jakarta-oro/LICENSE?content-type=text/plain">License</a>
</li>
</ul>
<p><strong>Software</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/site/binindex.cgi">Download</a>
</li>
<li> <a href="./demo.html">Demonstration</a>
</li>
</ul>
<p><strong>Community</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/site/getinvolved.html">Get Involved</a>
</li>
<li> <a href="http://jakarta.apache.org/site/mail.html">Mailing Lists</a>
</li>
<li> <a href="http://jakarta.apache.org/site/cvsindex.html">CVS Repositories</a>
</li>
<li> <a href="./users.html">Projects Using ORO</a>
</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li> <a href="./api/index.html">API</a>
</li>
</ul>
<p><strong>Related Projects</strong></p>
<ul>
<li> <a href="http://jakarta.apache.org/regexp/index.html">Regexp</a>
</li>
</ul>
</td>
<td width="80%" align="left" valign="top">
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Demonstration Applet"><strong>Demonstration Applet</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
This demonstration requires the
<a href="http://java.sun.com/products/plugin/index.html">
Java Plugin</a>.
</p>
<center>
<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" codebase="classes/" width="400" height="400">
<param name="code" value="examples/MatcherDemoApplet.class" />
<param name="codebase" value="classes/" />
<param name="type" value="application/x-java-applet;version=1.4" />
<param name="fontSize" value="14" />
<param name="background" value="d2b48c" />
<comment>
<embed type="application/x-java-applet;version=1.4" codebase="classes/" code="examples/MatcherDemoApplet.class" width="400" height="400" pluginspage="http://java.sun.com/products/plugin/1.3/plugin-install.html">
<param name="fontSize" value="14" />
<param name="background" value="d2b48c" />
</embed>
<noembed>
<hr />
If you can't see the demo applet, please try enabling
Java in your browser or downloading the
<a href="http://java.sun.com/products/plugin/index.html">
Java Plugin</a>.
<hr />
</noembed>
</comment>
</object>
</center>
<p>
Jakarta ORO's text processing classes support a wide range
of features which are not demonstrated in this applet.
Here we allow you to test for yourself the Perl5, AWK, and glob
regular expression support from the org.apache.oro.text.regex,
org.apache.oro.text.awk, and org.apache.oro.text packages.
The Perl5 syntax demonstrated is Perl 5.003 compatible as of
version 2.0.2. Remember, Perl5 compatibility means that
zero-width lookahead assertions, greed control, backreferences,
and other features are supported. This applet only demonstrates
the basic functionality of the packages. The split and substitute
methods of the Util class and other features are not demonstrated
here. To get a better idea of what else you can do with Jakarta
ORO, you should look through the <a href="api/index.html">API
documentation</a>.
</p>
</blockquote>
</p>
</td></tr>
<tr><td><br/></td></tr>
</table>
<table border="0" cellspacing="0" cellpadding="2" width="100%">
<tr><td bgcolor="#525D76">
<font color="#ffffff" face="arial,helvetica,sanserif">
<a name="Instructions"><strong>Instructions</strong></a>
</font>
</td></tr>
<tr><td>
<blockquote>
<p>
Select a regular expression syntax in the topmost choice menu.
Type a regular expression in the first text field. Then in
the <b>Search Input</b> text area, enter text that you want to
search. Click the <b>Search</b> button to search the input text.
The results will appear in the <b>Search Results</b> text area.
The <b>Reset</b> button will clear the regular expression, input,
and result text.
</p>
<p>
There are two choice menus that affect the regular expression
search. The <b>contains()</b> item causes the
<code>contains()</code> method of the PatternMatcher interface to be
used to perform the search. This search is done in a while loop,
finding all pattern matches occuring within the input. The
<b>matches()</b> item causes the <code>matches()</code> method of
the PatternMatcher interface to be used to perform the search. The
<code>matches()</code> method only tests if all the input
<b>EXACTLY</b> matches the regular expression. It does not check
to see if there is a match somewhere inside the input. That is
what the <code>contains()</code> method is for. This is sometimes
a point of confusion for users who have tried other packages. In
Jakarta ORO, <code>matches()</code> is used to find exact matches,
and <code>contains</code> is used to find a match contained in the
input.
</p>
<p>
The <b>Case Sensitive</b> and <b>Case Insensitive</b> choice items
are self-explanatory. <b>Case Sensitive</b> causes the regular
expression to be compiled with case sensitivity enabled. <b>Case
Insensitive</b> causes the regular expression to treat upper and
lower case characters the same.
</p>
<p>
The <b>Search Results</b> text area will display all the matches
found in the input when the <b>contains()</b> choice item is
selected. It will also display what the parenthesized subgroups
of a regular expression matched. When the <b>matches()</b> choice
item is selected, only whether or not the input exactly matched
the pattern is indicated.
</p>
<p>
Please note that if you don't enter anything for a regular
expression, it will be compiled as an expression matching a
zero-length string (the null string), which will match before and
after every character in the input.
</p>
</blockquote>
</p>
</td></tr>
<tr><td><br/></td></tr>
</table>
</td>
</tr>
<!-- FOOTER -->
<tr><td colspan="2">
<hr noshade="" size="1"/>
</td></tr>
<tr><td colspan="2">
<div align="center"><font color="#525D76" size="-1"><em>
Copyright © 1999-2003, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
</body>
</html>
<!-- end the processing -->
|