| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> |
| 2 |
<!--NewPage--> |
| 3 |
<HTML> |
| 4 |
<HEAD> |
| 5 |
<!-- Generated by javadoc on Sun Jun 16 19:34:42 GMT+04:00 2002 --> |
| 6 |
<TITLE> |
| 7 |
: Class Matcher |
| 8 |
</TITLE> |
| 9 |
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> |
| 10 |
</HEAD> |
| 11 |
<BODY BGCOLOR="white"> |
| 12 |
|
| 13 |
<!-- ========== START OF NAVBAR ========== --> |
| 14 |
<A NAME="navbar_top"><!-- --></A> |
| 15 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| 16 |
<TR> |
| 17 |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| 18 |
<A NAME="navbar_top_firstrow"><!-- --></A> |
| 19 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| 20 |
<TR ALIGN="center" VALIGN="top"> |
| 21 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| 22 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| 23 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| 24 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| 25 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| 26 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| 27 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| 28 |
</TR> |
| 29 |
</TABLE> |
| 30 |
</TD> |
| 31 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| 32 |
</EM> |
| 33 |
</TD> |
| 34 |
</TR> |
| 35 |
|
| 36 |
<TR> |
| 37 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 38 |
PREV CLASS |
| 39 |
<A HREF="../jregex/Optimizer.html"><B>NEXT CLASS</B></A></FONT></TD> |
| 40 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 41 |
<A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> |
| 42 |
<A HREF="Matcher.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| 43 |
</TR> |
| 44 |
<TR> |
| 45 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 46 |
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| 47 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 48 |
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| 49 |
</TR> |
| 50 |
</TABLE> |
| 51 |
<!-- =========== END OF NAVBAR =========== --> |
| 52 |
|
| 53 |
<HR> |
| 54 |
<!-- ======== START OF CLASS DATA ======== --> |
| 55 |
<H2> |
| 56 |
<FONT SIZE="-1"> |
| 57 |
jregex</FONT> |
| 58 |
<BR> |
| 59 |
Class Matcher</H2> |
| 60 |
<PRE> |
| 61 |
java.lang.Object |
| 62 |
| |
| 63 |
+--<B>jregex.Matcher</B> |
| 64 |
</PRE> |
| 65 |
<DL> |
| 66 |
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="../jregex/MatchResult.html">MatchResult</A></DD> |
| 67 |
</DL> |
| 68 |
<HR> |
| 69 |
<DL> |
| 70 |
<DT>public class <B>Matcher</B><DT>extends java.lang.Object<DT>implements <A HREF="../jregex/MatchResult.html">MatchResult</A></DL> |
| 71 |
|
| 72 |
<P> |
| 73 |
Matcher instance is an automaton that actually performs matching. It provides the following methods: |
| 74 |
<li> searching for a matching substrings : matcher.find() or matcher.findAll(); |
| 75 |
<li> testing whether a text matches a whole pattern : matcher.matches(); |
| 76 |
<li> testing whether the text matches the beginning of a pattern : matcher.matchesPrefix(); |
| 77 |
<li> searching with custom options : matcher.find(int options) |
| 78 |
<p> |
| 79 |
<b>Obtaining results</b><br> |
| 80 |
After the search succeded, i.e. if one of above methods returned <code>true</code> |
| 81 |
one may obtain an information on the match: |
| 82 |
<li> may check whether some group is captured : matcher.isCaptured(int); |
| 83 |
<li> may obtain start and end positions of the match and its length : matcher.start(int),matcher.end(int),matcher.length(int); |
| 84 |
<li> may obtain match contents as String : matcher.group(int).<br> |
| 85 |
The same way can be obtained the match prefix and suffix information. |
| 86 |
The appropriate methods are grouped in MatchResult interface, which the Matcher class implements.<br> |
| 87 |
Matcher objects are not thread-safe, so only one thread may use a matcher instance at a time. |
| 88 |
Note, that Pattern objects are thread-safe(the same instanse may be shared between |
| 89 |
multiple threads), and the typical tactics in multithreaded applications is to have one Pattern instance per expression(a singleton), |
| 90 |
and one Matcher object per thread. |
| 91 |
<P> |
| 92 |
<HR> |
| 93 |
|
| 94 |
<P> |
| 95 |
<!-- ======== INNER CLASS SUMMARY ======== --> |
| 96 |
|
| 97 |
|
| 98 |
<!-- =========== FIELD SUMMARY =========== --> |
| 99 |
|
| 100 |
<A NAME="field_summary"><!-- --></A> |
| 101 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 102 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| 103 |
<TD COLSPAN=2><FONT SIZE="+2"> |
| 104 |
<B>Field Summary</B></FONT></TD> |
| 105 |
</TR> |
| 106 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 107 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 108 |
<CODE>static int</CODE></FONT></TD> |
| 109 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#ACCEPT_INCOMPLETE">ACCEPT_INCOMPLETE</A></B></CODE> |
| 110 |
|
| 111 |
<BR> |
| 112 |
Experimental option; if a text ends up before the end of a pattern,report a match.</TD> |
| 113 |
</TR> |
| 114 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 115 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 116 |
<CODE>static int</CODE></FONT></TD> |
| 117 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#ANCHOR_END">ANCHOR_END</A></B></CODE> |
| 118 |
|
| 119 |
<BR> |
| 120 |
The same effect as "$" without REFlags.MULTILINE.</TD> |
| 121 |
</TR> |
| 122 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 123 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 124 |
<CODE>static int</CODE></FONT></TD> |
| 125 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#ANCHOR_LASTMATCH">ANCHOR_LASTMATCH</A></B></CODE> |
| 126 |
|
| 127 |
<BR> |
| 128 |
The same effect as "\\G".</TD> |
| 129 |
</TR> |
| 130 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 131 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 132 |
<CODE>static int</CODE></FONT></TD> |
| 133 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#ANCHOR_START">ANCHOR_START</A></B></CODE> |
| 134 |
|
| 135 |
<BR> |
| 136 |
The same effect as "^" without REFlags.MULTILINE.</TD> |
| 137 |
</TR> |
| 138 |
</TABLE> |
| 139 |
<A NAME="fields_inherited_from_class_jregex.MatchResult"><!-- --></A> |
| 140 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 141 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| 142 |
<TD><B>Fields inherited from interface jregex.<A HREF="../jregex/MatchResult.html">MatchResult</A></B></TD> |
| 143 |
</TR> |
| 144 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 145 |
<TD><CODE><A HREF="../jregex/MatchResult.html#MATCH">MATCH</A>, <A HREF="../jregex/MatchResult.html#PREFIX">PREFIX</A>, <A HREF="../jregex/MatchResult.html#SUFFIX">SUFFIX</A>, <A HREF="../jregex/MatchResult.html#TARGET">TARGET</A></CODE></TD> |
| 146 |
</TR> |
| 147 |
</TABLE> |
| 148 |
|
| 149 |
<!-- ======== CONSTRUCTOR SUMMARY ======== --> |
| 150 |
|
| 151 |
|
| 152 |
<!-- ========== METHOD SUMMARY =========== --> |
| 153 |
|
| 154 |
<A NAME="method_summary"><!-- --></A> |
| 155 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 156 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| 157 |
<TD COLSPAN=2><FONT SIZE="+2"> |
| 158 |
<B>Method Summary</B></FONT></TD> |
| 159 |
</TR> |
| 160 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 161 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 162 |
<CODE> char</CODE></FONT></TD> |
| 163 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#charAt(int)">charAt</A></B>(int i)</CODE> |
| 164 |
|
| 165 |
<BR> |
| 166 |
</TD> |
| 167 |
</TR> |
| 168 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 169 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 170 |
<CODE> char</CODE></FONT></TD> |
| 171 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#charAt(int, int)">charAt</A></B>(int i, |
| 172 |
int groupId)</CODE> |
| 173 |
|
| 174 |
<BR> |
| 175 |
</TD> |
| 176 |
</TR> |
| 177 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 178 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 179 |
<CODE> int</CODE></FONT></TD> |
| 180 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#end()">end</A></B>()</CODE> |
| 181 |
|
| 182 |
<BR> |
| 183 |
</TD> |
| 184 |
</TR> |
| 185 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 186 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 187 |
<CODE> int</CODE></FONT></TD> |
| 188 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#end(int)">end</A></B>(int id)</CODE> |
| 189 |
|
| 190 |
<BR> |
| 191 |
</TD> |
| 192 |
</TR> |
| 193 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 194 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 195 |
<CODE> boolean</CODE></FONT></TD> |
| 196 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#find()">find</A></B>()</CODE> |
| 197 |
|
| 198 |
<BR> |
| 199 |
Searches through a target for a matching substring, starting from just after the end of last match. |
| 200 |
</TD> |
| 201 |
</TR> |
| 202 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 203 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 204 |
<CODE> boolean</CODE></FONT></TD> |
| 205 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#find(int)">find</A></B>(int anchors)</CODE> |
| 206 |
|
| 207 |
<BR> |
| 208 |
Searches through a target for a matching substring, starting from just after the end of last match. |
| 209 |
</TD> |
| 210 |
</TR> |
| 211 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 212 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 213 |
<CODE> <A HREF="../jregex/MatchIterator.html">MatchIterator</A></CODE></FONT></TD> |
| 214 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#findAll()">findAll</A></B>()</CODE> |
| 215 |
|
| 216 |
<BR> |
| 217 |
The same as findAll(int), but with default behaviour;</TD> |
| 218 |
</TR> |
| 219 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 220 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 221 |
<CODE> <A HREF="../jregex/MatchIterator.html">MatchIterator</A></CODE></FONT></TD> |
| 222 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#findAll(int)">findAll</A></B>(int options)</CODE> |
| 223 |
|
| 224 |
<BR> |
| 225 |
Returns an iterator over the matches found by subsequently calling find(options), the search starts from the zero position.</TD> |
| 226 |
</TR> |
| 227 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 228 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 229 |
<CODE> boolean</CODE></FONT></TD> |
| 230 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#getGroup(int, java.lang.StringBuffer)">getGroup</A></B>(int n, |
| 231 |
java.lang.StringBuffer sb)</CODE> |
| 232 |
|
| 233 |
<BR> |
| 234 |
</TD> |
| 235 |
</TR> |
| 236 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 237 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 238 |
<CODE> boolean</CODE></FONT></TD> |
| 239 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#getGroup(int, jregex.TextBuffer)">getGroup</A></B>(int n, |
| 240 |
<A HREF="../jregex/TextBuffer.html">TextBuffer</A> tb)</CODE> |
| 241 |
|
| 242 |
<BR> |
| 243 |
</TD> |
| 244 |
</TR> |
| 245 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 246 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 247 |
<CODE> boolean</CODE></FONT></TD> |
| 248 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#getGroup(java.lang.String, java.lang.StringBuffer)">getGroup</A></B>(java.lang.String name, |
| 249 |
java.lang.StringBuffer sb)</CODE> |
| 250 |
|
| 251 |
<BR> |
| 252 |
</TD> |
| 253 |
</TR> |
| 254 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 255 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 256 |
<CODE> boolean</CODE></FONT></TD> |
| 257 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#getGroup(java.lang.String, jregex.TextBuffer)">getGroup</A></B>(java.lang.String name, |
| 258 |
<A HREF="../jregex/TextBuffer.html">TextBuffer</A> tb)</CODE> |
| 259 |
|
| 260 |
<BR> |
| 261 |
</TD> |
| 262 |
</TR> |
| 263 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 264 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 265 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 266 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#group(int)">group</A></B>(int n)</CODE> |
| 267 |
|
| 268 |
<BR> |
| 269 |
</TD> |
| 270 |
</TR> |
| 271 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 272 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 273 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 274 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#group(java.lang.String)">group</A></B>(java.lang.String name)</CODE> |
| 275 |
|
| 276 |
<BR> |
| 277 |
</TD> |
| 278 |
</TR> |
| 279 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 280 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 281 |
<CODE> int</CODE></FONT></TD> |
| 282 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#groupCount()">groupCount</A></B>()</CODE> |
| 283 |
|
| 284 |
<BR> |
| 285 |
</TD> |
| 286 |
</TR> |
| 287 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 288 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 289 |
<CODE> java.lang.String[]</CODE></FONT></TD> |
| 290 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#groups()">groups</A></B>()</CODE> |
| 291 |
|
| 292 |
<BR> |
| 293 |
</TD> |
| 294 |
</TR> |
| 295 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 296 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 297 |
<CODE> java.util.Vector</CODE></FONT></TD> |
| 298 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#groupv()">groupv</A></B>()</CODE> |
| 299 |
|
| 300 |
<BR> |
| 301 |
</TD> |
| 302 |
</TR> |
| 303 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 304 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 305 |
<CODE> boolean</CODE></FONT></TD> |
| 306 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#isCaptured()">isCaptured</A></B>()</CODE> |
| 307 |
|
| 308 |
<BR> |
| 309 |
</TD> |
| 310 |
</TR> |
| 311 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 312 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 313 |
<CODE> boolean</CODE></FONT></TD> |
| 314 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#isCaptured(int)">isCaptured</A></B>(int id)</CODE> |
| 315 |
|
| 316 |
<BR> |
| 317 |
</TD> |
| 318 |
</TR> |
| 319 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 320 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 321 |
<CODE> boolean</CODE></FONT></TD> |
| 322 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#isCaptured(java.lang.String)">isCaptured</A></B>(java.lang.String groupName)</CODE> |
| 323 |
|
| 324 |
<BR> |
| 325 |
</TD> |
| 326 |
</TR> |
| 327 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 328 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 329 |
<CODE> boolean</CODE></FONT></TD> |
| 330 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#isStart()">isStart</A></B>()</CODE> |
| 331 |
|
| 332 |
<BR> |
| 333 |
<B>Deprecated.</B> <I>Replaced by isPrefix()</I></TD> |
| 334 |
</TR> |
| 335 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 336 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 337 |
<CODE> int</CODE></FONT></TD> |
| 338 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#length()">length</A></B>()</CODE> |
| 339 |
|
| 340 |
<BR> |
| 341 |
</TD> |
| 342 |
</TR> |
| 343 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 344 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 345 |
<CODE> int</CODE></FONT></TD> |
| 346 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#length(int)">length</A></B>(int id)</CODE> |
| 347 |
|
| 348 |
<BR> |
| 349 |
</TD> |
| 350 |
</TR> |
| 351 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 352 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 353 |
<CODE> boolean</CODE></FONT></TD> |
| 354 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#matches()">matches</A></B>()</CODE> |
| 355 |
|
| 356 |
<BR> |
| 357 |
Tells whether a current target matches the whole pattern. |
| 358 |
</TD> |
| 359 |
</TR> |
| 360 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 361 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 362 |
<CODE> boolean</CODE></FONT></TD> |
| 363 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#matches(java.lang.String)">matches</A></B>(java.lang.String s)</CODE> |
| 364 |
|
| 365 |
<BR> |
| 366 |
Just a combination of setTarget(String) and matches().</TD> |
| 367 |
</TR> |
| 368 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 369 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 370 |
<CODE> boolean</CODE></FONT></TD> |
| 371 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#matchesPrefix()">matchesPrefix</A></B>()</CODE> |
| 372 |
|
| 373 |
<BR> |
| 374 |
Tells whether the entire target matches the beginning of the pattern. |
| 375 |
</TD> |
| 376 |
</TR> |
| 377 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 378 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 379 |
<CODE> <A HREF="../jregex/Pattern.html">Pattern</A></CODE></FONT></TD> |
| 380 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#pattern()">pattern</A></B>()</CODE> |
| 381 |
|
| 382 |
<BR> |
| 383 |
</TD> |
| 384 |
</TR> |
| 385 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 386 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 387 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 388 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#prefix()">prefix</A></B>()</CODE> |
| 389 |
|
| 390 |
<BR> |
| 391 |
</TD> |
| 392 |
</TR> |
| 393 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 394 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 395 |
<CODE> boolean</CODE></FONT></TD> |
| 396 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#proceed()">proceed</A></B>()</CODE> |
| 397 |
|
| 398 |
<BR> |
| 399 |
Continues to search from where the last search left off. |
| 400 |
</TD> |
| 401 |
</TR> |
| 402 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 403 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 404 |
<CODE> boolean</CODE></FONT></TD> |
| 405 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#proceed(int)">proceed</A></B>(int options)</CODE> |
| 406 |
|
| 407 |
<BR> |
| 408 |
Continues to search from where the last search left off using specified options: |
| 409 |
Matcher m=new Pattern("\\w+").matcher("abc"); |
| 410 |
while(m.proceed(0)){ |
| 411 |
System.out.println(m.group(0)); |
| 412 |
} |
| 413 |
|
| 414 |
Output: |
| 415 |
abc |
| 416 |
ab |
| 417 |
a |
| 418 |
bc |
| 419 |
b |
| 420 |
c |
| 421 |
|
| 422 |
For example, let's find all odd nubmers occuring in a text: |
| 423 |
Matcher m=new Pattern("\\d+").matcher("123"); |
| 424 |
while(m.proceed(0)){ |
| 425 |
String match=m.group(0); |
| 426 |
if(isOdd(Integer.parseInt(match))) System.out.println(match); |
| 427 |
} |
| 428 |
|
| 429 |
static boolean isOdd(int i){ |
| 430 |
return (i&1)>0; |
| 431 |
} |
| 432 |
|
| 433 |
This outputs: |
| 434 |
123 |
| 435 |
1 |
| 436 |
23 |
| 437 |
3 |
| 438 |
|
| 439 |
Note that using <code>find()</code> method we would find '123' only.</TD> |
| 440 |
</TR> |
| 441 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 442 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 443 |
<CODE> void</CODE></FONT></TD> |
| 444 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setPosition(int)">setPosition</A></B>(int pos)</CODE> |
| 445 |
|
| 446 |
<BR> |
| 447 |
Allows to set a position the subsequent find()/find(int) will start from.</TD> |
| 448 |
</TR> |
| 449 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 450 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 451 |
<CODE> void</CODE></FONT></TD> |
| 452 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(char[], int, int)">setTarget</A></B>(char[] text, |
| 453 |
int start, |
| 454 |
int len)</CODE> |
| 455 |
|
| 456 |
<BR> |
| 457 |
Supplies a text to search in/match with, as a part of char array. |
| 458 |
</TD> |
| 459 |
</TR> |
| 460 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 461 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 462 |
<CODE> void</CODE></FONT></TD> |
| 463 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(char[], int, int, boolean)">setTarget</A></B>(char[] text, |
| 464 |
int start, |
| 465 |
int len, |
| 466 |
boolean shared)</CODE> |
| 467 |
|
| 468 |
<BR> |
| 469 |
To be used with much care. |
| 470 |
</TD> |
| 471 |
</TR> |
| 472 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 473 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 474 |
<CODE> void</CODE></FONT></TD> |
| 475 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)">setTarget</A></B>(<A HREF="../jregex/Matcher.html">Matcher</A> m, |
| 476 |
int groupId)</CODE> |
| 477 |
|
| 478 |
<BR> |
| 479 |
This method allows to efficiently pass data between matchers. |
| 480 |
</TD> |
| 481 |
</TR> |
| 482 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 483 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 484 |
<CODE> void</CODE></FONT></TD> |
| 485 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)">setTarget</A></B>(java.io.Reader in, |
| 486 |
int len)</CODE> |
| 487 |
|
| 488 |
<BR> |
| 489 |
Supplies a text to search in/match with through a stream. |
| 490 |
</TD> |
| 491 |
</TR> |
| 492 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 493 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 494 |
<CODE> void</CODE></FONT></TD> |
| 495 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(java.lang.String)">setTarget</A></B>(java.lang.String text)</CODE> |
| 496 |
|
| 497 |
<BR> |
| 498 |
Supplies a text to search in/match with. |
| 499 |
</TD> |
| 500 |
</TR> |
| 501 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 502 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 503 |
<CODE> void</CODE></FONT></TD> |
| 504 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)">setTarget</A></B>(java.lang.String text, |
| 505 |
int start, |
| 506 |
int len)</CODE> |
| 507 |
|
| 508 |
<BR> |
| 509 |
Supplies a text to search in/match with, as a part of String. |
| 510 |
</TD> |
| 511 |
</TR> |
| 512 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 513 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 514 |
<CODE> void</CODE></FONT></TD> |
| 515 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#skip()">skip</A></B>()</CODE> |
| 516 |
|
| 517 |
<BR> |
| 518 |
Sets the current search position just after the end of last match.</TD> |
| 519 |
</TR> |
| 520 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 521 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 522 |
<CODE> int</CODE></FONT></TD> |
| 523 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#start()">start</A></B>()</CODE> |
| 524 |
|
| 525 |
<BR> |
| 526 |
</TD> |
| 527 |
</TR> |
| 528 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 529 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 530 |
<CODE> int</CODE></FONT></TD> |
| 531 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#start(int)">start</A></B>(int id)</CODE> |
| 532 |
|
| 533 |
<BR> |
| 534 |
</TD> |
| 535 |
</TR> |
| 536 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 537 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 538 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 539 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#suffix()">suffix</A></B>()</CODE> |
| 540 |
|
| 541 |
<BR> |
| 542 |
</TD> |
| 543 |
</TR> |
| 544 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 545 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 546 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 547 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#target()">target</A></B>()</CODE> |
| 548 |
|
| 549 |
<BR> |
| 550 |
</TD> |
| 551 |
</TR> |
| 552 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 553 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 554 |
<CODE> char[]</CODE></FONT></TD> |
| 555 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#targetChars()">targetChars</A></B>()</CODE> |
| 556 |
|
| 557 |
<BR> |
| 558 |
</TD> |
| 559 |
</TR> |
| 560 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 561 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 562 |
<CODE> int</CODE></FONT></TD> |
| 563 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#targetEnd()">targetEnd</A></B>()</CODE> |
| 564 |
|
| 565 |
<BR> |
| 566 |
</TD> |
| 567 |
</TR> |
| 568 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 569 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 570 |
<CODE> int</CODE></FONT></TD> |
| 571 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#targetStart()">targetStart</A></B>()</CODE> |
| 572 |
|
| 573 |
<BR> |
| 574 |
</TD> |
| 575 |
</TR> |
| 576 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 577 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 578 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 579 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#toString_d()">toString_d</A></B>()</CODE> |
| 580 |
|
| 581 |
<BR> |
| 582 |
</TD> |
| 583 |
</TR> |
| 584 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 585 |
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| 586 |
<CODE> java.lang.String</CODE></FONT></TD> |
| 587 |
<TD><CODE><B><A HREF="../jregex/Matcher.html#toString()">toString</A></B>()</CODE> |
| 588 |
|
| 589 |
<BR> |
| 590 |
</TD> |
| 591 |
</TR> |
| 592 |
</TABLE> |
| 593 |
<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| 594 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 595 |
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| 596 |
<TD><B>Methods inherited from class java.lang.Object</B></TD> |
| 597 |
</TR> |
| 598 |
<TR BGCOLOR="white" CLASS="TableRowColor"> |
| 599 |
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD> |
| 600 |
</TR> |
| 601 |
</TABLE> |
| 602 |
|
| 603 |
<P> |
| 604 |
|
| 605 |
<!-- ============ FIELD DETAIL =========== --> |
| 606 |
|
| 607 |
<A NAME="field_detail"><!-- --></A> |
| 608 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 609 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| 610 |
<TD COLSPAN=1><FONT SIZE="+2"> |
| 611 |
<B>Field Detail</B></FONT></TD> |
| 612 |
</TR> |
| 613 |
</TABLE> |
| 614 |
|
| 615 |
<A NAME="ANCHOR_START"><!-- --></A><H3> |
| 616 |
ANCHOR_START</H3> |
| 617 |
<PRE> |
| 618 |
public static final int <B>ANCHOR_START</B></PRE> |
| 619 |
<DL> |
| 620 |
<DD>The same effect as "^" without REFlags.MULTILINE.<DD><DL> |
| 621 |
<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#find(int)"><CODE>find(int)</CODE></A></DL> |
| 622 |
</DD> |
| 623 |
</DL> |
| 624 |
<HR> |
| 625 |
|
| 626 |
<A NAME="ANCHOR_LASTMATCH"><!-- --></A><H3> |
| 627 |
ANCHOR_LASTMATCH</H3> |
| 628 |
<PRE> |
| 629 |
public static final int <B>ANCHOR_LASTMATCH</B></PRE> |
| 630 |
<DL> |
| 631 |
<DD>The same effect as "\\G".<DD><DL> |
| 632 |
<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#find(int)"><CODE>find(int)</CODE></A></DL> |
| 633 |
</DD> |
| 634 |
</DL> |
| 635 |
<HR> |
| 636 |
|
| 637 |
<A NAME="ANCHOR_END"><!-- --></A><H3> |
| 638 |
ANCHOR_END</H3> |
| 639 |
<PRE> |
| 640 |
public static final int <B>ANCHOR_END</B></PRE> |
| 641 |
<DL> |
| 642 |
<DD>The same effect as "$" without REFlags.MULTILINE.<DD><DL> |
| 643 |
<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#find(int)"><CODE>find(int)</CODE></A></DL> |
| 644 |
</DD> |
| 645 |
</DL> |
| 646 |
<HR> |
| 647 |
|
| 648 |
<A NAME="ACCEPT_INCOMPLETE"><!-- --></A><H3> |
| 649 |
ACCEPT_INCOMPLETE</H3> |
| 650 |
<PRE> |
| 651 |
public static final int <B>ACCEPT_INCOMPLETE</B></PRE> |
| 652 |
<DL> |
| 653 |
<DD>Experimental option; if a text ends up before the end of a pattern,report a match.<DD><DL> |
| 654 |
<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#find(int)"><CODE>find(int)</CODE></A></DL> |
| 655 |
</DD> |
| 656 |
</DL> |
| 657 |
|
| 658 |
<!-- ========= CONSTRUCTOR DETAIL ======== --> |
| 659 |
|
| 660 |
|
| 661 |
<!-- ============ METHOD DETAIL ========== --> |
| 662 |
|
| 663 |
<A NAME="method_detail"><!-- --></A> |
| 664 |
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> |
| 665 |
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| 666 |
<TD COLSPAN=1><FONT SIZE="+2"> |
| 667 |
<B>Method Detail</B></FONT></TD> |
| 668 |
</TR> |
| 669 |
</TABLE> |
| 670 |
|
| 671 |
<A NAME="setTarget(jregex.Matcher, int)"><!-- --></A><H3> |
| 672 |
setTarget</H3> |
| 673 |
<PRE> |
| 674 |
public final void <B>setTarget</B>(<A HREF="../jregex/Matcher.html">Matcher</A> m, |
| 675 |
int groupId)</PRE> |
| 676 |
<DL> |
| 677 |
<DD>This method allows to efficiently pass data between matchers. |
| 678 |
Note that a matcher may pass data to itself:<pre> |
| 679 |
Matcher m=new Pattern("\\w+").matcher(myString); |
| 680 |
if(m.find())m.setTarget(m,m.SUFFIX); //forget all that is not a suffix |
| 681 |
</pre> |
| 682 |
Resets current search position to zero.<DD><DL> |
| 683 |
</DL> |
| 684 |
</DD> |
| 685 |
<DD><DL> |
| 686 |
<DT><B>Parameters:</B><DD><CODE>m</CODE> - - a matcher that is a source of data<DD><CODE>groupId</CODE> - - which group to take data from<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(java.lang.String)"><CODE>setTarget(java.lang.String)</CODE></A>, |
| 687 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)"><CODE>setTarget(java.lang.String,int,int)</CODE></A>, |
| 688 |
<A HREF="../jregex/Matcher.html#setTarget(char[], int, int)"><CODE>setTarget(char[],int,int)</CODE></A>, |
| 689 |
<A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)"><CODE>setTarget(java.io.Reader,int)</CODE></A></DL> |
| 690 |
</DD> |
| 691 |
</DL> |
| 692 |
<HR> |
| 693 |
|
| 694 |
<A NAME="setTarget(java.lang.String)"><!-- --></A><H3> |
| 695 |
setTarget</H3> |
| 696 |
<PRE> |
| 697 |
public void <B>setTarget</B>(java.lang.String text)</PRE> |
| 698 |
<DL> |
| 699 |
<DD>Supplies a text to search in/match with. |
| 700 |
Resets current search position to zero.<DD><DL> |
| 701 |
</DL> |
| 702 |
</DD> |
| 703 |
<DD><DL> |
| 704 |
<DT><B>Parameters:</B><DD><CODE>text</CODE> - - a data<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)"><CODE>setTarget(jregex.Matcher,int)</CODE></A>, |
| 705 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)"><CODE>setTarget(java.lang.String,int,int)</CODE></A>, |
| 706 |
<A HREF="../jregex/Matcher.html#setTarget(char[], int, int)"><CODE>setTarget(char[],int,int)</CODE></A>, |
| 707 |
<A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)"><CODE>setTarget(java.io.Reader,int)</CODE></A></DL> |
| 708 |
</DD> |
| 709 |
</DL> |
| 710 |
<HR> |
| 711 |
|
| 712 |
<A NAME="setTarget(java.lang.String, int, int)"><!-- --></A><H3> |
| 713 |
setTarget</H3> |
| 714 |
<PRE> |
| 715 |
public void <B>setTarget</B>(java.lang.String text, |
| 716 |
int start, |
| 717 |
int len)</PRE> |
| 718 |
<DL> |
| 719 |
<DD>Supplies a text to search in/match with, as a part of String. |
| 720 |
Resets current search position to zero.<DD><DL> |
| 721 |
</DL> |
| 722 |
</DD> |
| 723 |
<DD><DL> |
| 724 |
<DT><B>Parameters:</B><DD><CODE>text</CODE> - - a data source<DD><CODE>start</CODE> - - where the target starts<DD><CODE>len</CODE> - - how long is the target<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)"><CODE>setTarget(jregex.Matcher,int)</CODE></A>, |
| 725 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String)"><CODE>setTarget(java.lang.String)</CODE></A>, |
| 726 |
<A HREF="../jregex/Matcher.html#setTarget(char[], int, int)"><CODE>setTarget(char[],int,int)</CODE></A>, |
| 727 |
<A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)"><CODE>setTarget(java.io.Reader,int)</CODE></A></DL> |
| 728 |
</DD> |
| 729 |
</DL> |
| 730 |
<HR> |
| 731 |
|
| 732 |
<A NAME="setTarget(char[], int, int)"><!-- --></A><H3> |
| 733 |
setTarget</H3> |
| 734 |
<PRE> |
| 735 |
public void <B>setTarget</B>(char[] text, |
| 736 |
int start, |
| 737 |
int len)</PRE> |
| 738 |
<DL> |
| 739 |
<DD>Supplies a text to search in/match with, as a part of char array. |
| 740 |
Resets current search position to zero.<DD><DL> |
| 741 |
</DL> |
| 742 |
</DD> |
| 743 |
<DD><DL> |
| 744 |
<DT><B>Parameters:</B><DD><CODE>text</CODE> - - a data source<DD><CODE>start</CODE> - - where the target starts<DD><CODE>len</CODE> - - how long is the target<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)"><CODE>setTarget(jregex.Matcher,int)</CODE></A>, |
| 745 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String)"><CODE>setTarget(java.lang.String)</CODE></A>, |
| 746 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)"><CODE>setTarget(java.lang.String,int,int)</CODE></A>, |
| 747 |
<A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)"><CODE>setTarget(java.io.Reader,int)</CODE></A></DL> |
| 748 |
</DD> |
| 749 |
</DL> |
| 750 |
<HR> |
| 751 |
|
| 752 |
<A NAME="setTarget(char[], int, int, boolean)"><!-- --></A><H3> |
| 753 |
setTarget</H3> |
| 754 |
<PRE> |
| 755 |
public final void <B>setTarget</B>(char[] text, |
| 756 |
int start, |
| 757 |
int len, |
| 758 |
boolean shared)</PRE> |
| 759 |
<DL> |
| 760 |
<DD>To be used with much care. |
| 761 |
Supplies a text to search in/match with, as a part of a char array, as above, but also allows to permit |
| 762 |
to use the array as internal buffer for subsequent inputs. That is, if we call it with <code>shared=false</code>:<pre> |
| 763 |
myMatcher.setTarget(myCharArray,x,y,<b>false</b>); //we declare that array contents is NEITHER shared NOR will be used later, so may modifications on it are permitted |
| 764 |
</pre> |
| 765 |
then we should expect the array contents to be changed on subsequent setTarget(..) operations. |
| 766 |
Such method may yield some increase in perfomanse in the case of multiple setTarget() calls. |
| 767 |
Resets current search position to zero.<DD><DL> |
| 768 |
</DL> |
| 769 |
</DD> |
| 770 |
<DD><DL> |
| 771 |
<DT><B>Parameters:</B><DD><CODE>text</CODE> - - a data source<DD><CODE>start</CODE> - - where the target starts<DD><CODE>len</CODE> - - how long is the target<DD><CODE>shared</CODE> - - if <code>true<code>: data are shared or used later, <b>don't</b> modify it; if <code>false<code>: possible modifications of the text on subsequent <code>setTarget()</code> calls are perceived and allowed.<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)"><CODE>setTarget(jregex.Matcher,int)</CODE></A>, |
| 772 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String)"><CODE>setTarget(java.lang.String)</CODE></A>, |
| 773 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)"><CODE>setTarget(java.lang.String,int,int)</CODE></A>, |
| 774 |
<A HREF="../jregex/Matcher.html#setTarget(char[], int, int)"><CODE>setTarget(char[],int,int)</CODE></A>, |
| 775 |
<A HREF="../jregex/Matcher.html#setTarget(java.io.Reader, int)"><CODE>setTarget(java.io.Reader,int)</CODE></A></DL> |
| 776 |
</DD> |
| 777 |
</DL> |
| 778 |
<HR> |
| 779 |
|
| 780 |
<A NAME="setTarget(java.io.Reader, int)"><!-- --></A><H3> |
| 781 |
setTarget</H3> |
| 782 |
<PRE> |
| 783 |
public void <B>setTarget</B>(java.io.Reader in, |
| 784 |
int len) |
| 785 |
throws java.io.IOException</PRE> |
| 786 |
<DL> |
| 787 |
<DD>Supplies a text to search in/match with through a stream. |
| 788 |
Resets current search position to zero.<DD><DL> |
| 789 |
</DL> |
| 790 |
</DD> |
| 791 |
<DD><DL> |
| 792 |
<DT><B>Parameters:</B><DD><CODE>in</CODE> - - a data stream;<DD><CODE>len</CODE> - - how much characters should be read; if len is -1, read the entire stream.<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#setTarget(jregex.Matcher, int)"><CODE>setTarget(jregex.Matcher,int)</CODE></A>, |
| 793 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String)"><CODE>setTarget(java.lang.String)</CODE></A>, |
| 794 |
<A HREF="../jregex/Matcher.html#setTarget(java.lang.String, int, int)"><CODE>setTarget(java.lang.String,int,int)</CODE></A>, |
| 795 |
<A HREF="../jregex/Matcher.html#setTarget(char[], int, int)"><CODE>setTarget(char[],int,int)</CODE></A></DL> |
| 796 |
</DD> |
| 797 |
</DL> |
| 798 |
<HR> |
| 799 |
|
| 800 |
<A NAME="matchesPrefix()"><!-- --></A><H3> |
| 801 |
matchesPrefix</H3> |
| 802 |
<PRE> |
| 803 |
public final boolean <B>matchesPrefix</B>()</PRE> |
| 804 |
<DL> |
| 805 |
<DD>Tells whether the entire target matches the beginning of the pattern. |
| 806 |
The whole pattern is also regarded as its beginning.<br> |
| 807 |
This feature allows to find a mismatch by examining only a beginning part of |
| 808 |
the target (as if the beginning of the target doesn't match the beginning of the pattern, then the entire target |
| 809 |
also couldn't match).<br> |
| 810 |
For example the following assertions yield <code>true<code>:<pre> |
| 811 |
Pattern p=new Pattern("abcd"); |
| 812 |
p.matcher("").matchesPrefix(); |
| 813 |
p.matcher("a").matchesPrefix(); |
| 814 |
p.matcher("ab").matchesPrefix(); |
| 815 |
p.matcher("abc").matchesPrefix(); |
| 816 |
p.matcher("abcd").matchesPrefix(); |
| 817 |
</pre> |
| 818 |
and the following yield <code>false<code>:<pre> |
| 819 |
p.matcher("b").isPrefix(); |
| 820 |
p.matcher("abcdef").isPrefix(); |
| 821 |
p.matcher("x").isPrefix(); |
| 822 |
</pre><DD><DL> |
| 823 |
</DL> |
| 824 |
</DD> |
| 825 |
<DD><DL> |
| 826 |
<DT><B>Returns:</B><DD>true if the entire target matches the beginning of the pattern</DL> |
| 827 |
</DD> |
| 828 |
</DL> |
| 829 |
<HR> |
| 830 |
|
| 831 |
<A NAME="isStart()"><!-- --></A><H3> |
| 832 |
isStart</H3> |
| 833 |
<PRE> |
| 834 |
public final boolean <B>isStart</B>()</PRE> |
| 835 |
<DL> |
| 836 |
<DD><B>Deprecated.</B> <I>Replaced by isPrefix()</I> |
| 837 |
<P> |
| 838 |
<DD>Just an old name for isPrefix().<br> |
| 839 |
Retained for backwards compatibility.<DD><DL> |
| 840 |
</DL> |
| 841 |
</DD> |
| 842 |
</DL> |
| 843 |
<HR> |
| 844 |
|
| 845 |
<A NAME="matches()"><!-- --></A><H3> |
| 846 |
matches</H3> |
| 847 |
<PRE> |
| 848 |
public final boolean <B>matches</B>()</PRE> |
| 849 |
<DL> |
| 850 |
<DD>Tells whether a current target matches the whole pattern. |
| 851 |
For example the following yields the <code>true<code>:<pre> |
| 852 |
Pattern p=new Pattern("\\w+"); |
| 853 |
p.matcher("a").matches(); |
| 854 |
p.matcher("ab").matches(); |
| 855 |
p.matcher("abc").matches(); |
| 856 |
</pre> |
| 857 |
and the following yields the <code>false<code>:<pre> |
| 858 |
p.matcher("abc def").matches(); |
| 859 |
p.matcher("bcd ").matches(); |
| 860 |
p.matcher(" bcd").matches(); |
| 861 |
p.matcher("#xyz#").matches(); |
| 862 |
</pre><DD><DL> |
| 863 |
</DL> |
| 864 |
</DD> |
| 865 |
<DD><DL> |
| 866 |
<DT><B>Returns:</B><DD>whether a current target matches the whole pattern.</DL> |
| 867 |
</DD> |
| 868 |
</DL> |
| 869 |
<HR> |
| 870 |
|
| 871 |
<A NAME="matches(java.lang.String)"><!-- --></A><H3> |
| 872 |
matches</H3> |
| 873 |
<PRE> |
| 874 |
public final boolean <B>matches</B>(java.lang.String s)</PRE> |
| 875 |
<DL> |
| 876 |
<DD>Just a combination of setTarget(String) and matches().<DD><DL> |
| 877 |
</DL> |
| 878 |
</DD> |
| 879 |
<DD><DL> |
| 880 |
<DT><B>Parameters:</B><DD><CODE>s</CODE> - the target string;<DT><B>Returns:</B><DD>whether the specified string matches the whole pattern.</DL> |
| 881 |
</DD> |
| 882 |
</DL> |
| 883 |
<HR> |
| 884 |
|
| 885 |
<A NAME="setPosition(int)"><!-- --></A><H3> |
| 886 |
setPosition</H3> |
| 887 |
<PRE> |
| 888 |
public void <B>setPosition</B>(int pos)</PRE> |
| 889 |
<DL> |
| 890 |
<DD>Allows to set a position the subsequent find()/find(int) will start from.<DD><DL> |
| 891 |
</DL> |
| 892 |
</DD> |
| 893 |
<DD><DL> |
| 894 |
<DT><B>Parameters:</B><DD><CODE>pos</CODE> - the position to start from;<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#find()"><CODE>find()</CODE></A>, |
| 895 |
<A HREF="../jregex/Matcher.html#find(int)"><CODE>find(int)</CODE></A></DL> |
| 896 |
</DD> |
| 897 |
</DL> |
| 898 |
<HR> |
| 899 |
|
| 900 |
<A NAME="find()"><!-- --></A><H3> |
| 901 |
find</H3> |
| 902 |
<PRE> |
| 903 |
public final boolean <B>find</B>()</PRE> |
| 904 |
<DL> |
| 905 |
<DD>Searches through a target for a matching substring, starting from just after the end of last match. |
| 906 |
If there wasn't any search performed, starts from zero.<DD><DL> |
| 907 |
</DL> |
| 908 |
</DD> |
| 909 |
<DD><DL> |
| 910 |
<DT><B>Returns:</B><DD><code>true</code> if a match found.</DL> |
| 911 |
</DD> |
| 912 |
</DL> |
| 913 |
<HR> |
| 914 |
|
| 915 |
<A NAME="find(int)"><!-- --></A><H3> |
| 916 |
find</H3> |
| 917 |
<PRE> |
| 918 |
public final boolean <B>find</B>(int anchors)</PRE> |
| 919 |
<DL> |
| 920 |
<DD>Searches through a target for a matching substring, starting from just after the end of last match. |
| 921 |
If there wasn't any search performed, starts from zero.<DD><DL> |
| 922 |
</DL> |
| 923 |
</DD> |
| 924 |
<DD><DL> |
| 925 |
<DT><B>Parameters:</B><DD><CODE>anchors</CODE> - a zero or a combination(bitwise OR) of ANCHOR_START,ANCHOR_END,ANCHOR_LASTMATCH,ACCEPT_INCOMPLETE<DT><B>Returns:</B><DD><code>true</code> if a match found.</DL> |
| 926 |
</DD> |
| 927 |
</DL> |
| 928 |
<HR> |
| 929 |
|
| 930 |
<A NAME="findAll()"><!-- --></A><H3> |
| 931 |
findAll</H3> |
| 932 |
<PRE> |
| 933 |
public <A HREF="../jregex/MatchIterator.html">MatchIterator</A> <B>findAll</B>()</PRE> |
| 934 |
<DL> |
| 935 |
<DD>The same as findAll(int), but with default behaviour;<DD><DL> |
| 936 |
</DL> |
| 937 |
</DD> |
| 938 |
</DL> |
| 939 |
<HR> |
| 940 |
|
| 941 |
<A NAME="findAll(int)"><!-- --></A><H3> |
| 942 |
findAll</H3> |
| 943 |
<PRE> |
| 944 |
public <A HREF="../jregex/MatchIterator.html">MatchIterator</A> <B>findAll</B>(int options)</PRE> |
| 945 |
<DL> |
| 946 |
<DD>Returns an iterator over the matches found by subsequently calling find(options), the search starts from the zero position.<DD><DL> |
| 947 |
</DL> |
| 948 |
</DD> |
| 949 |
</DL> |
| 950 |
<HR> |
| 951 |
|
| 952 |
<A NAME="proceed()"><!-- --></A><H3> |
| 953 |
proceed</H3> |
| 954 |
<PRE> |
| 955 |
public final boolean <B>proceed</B>()</PRE> |
| 956 |
<DL> |
| 957 |
<DD>Continues to search from where the last search left off. |
| 958 |
The same as proceed(0).<DD><DL> |
| 959 |
</DL> |
| 960 |
</DD> |
| 961 |
<DD><DL> |
| 962 |
<DT><B>See Also: </B><DD><A HREF="../jregex/Matcher.html#proceed(int)"><CODE>proceed(int)</CODE></A></DL> |
| 963 |
</DD> |
| 964 |
</DL> |
| 965 |
<HR> |
| 966 |
|
| 967 |
<A NAME="proceed(int)"><!-- --></A><H3> |
| 968 |
proceed</H3> |
| 969 |
<PRE> |
| 970 |
public final boolean <B>proceed</B>(int options)</PRE> |
| 971 |
<DL> |
| 972 |
<DD>Continues to search from where the last search left off using specified options:<pre> |
| 973 |
Matcher m=new Pattern("\\w+").matcher("abc"); |
| 974 |
while(m.proceed(0)){ |
| 975 |
System.out.println(m.group(0)); |
| 976 |
} |
| 977 |
</pre> |
| 978 |
Output:<pre> |
| 979 |
abc |
| 980 |
ab |
| 981 |
a |
| 982 |
bc |
| 983 |
b |
| 984 |
c |
| 985 |
</pre> |
| 986 |
For example, let's find all odd nubmers occuring in a text:<pre> |
| 987 |
Matcher m=new Pattern("\\d+").matcher("123"); |
| 988 |
while(m.proceed(0)){ |
| 989 |
String match=m.group(0); |
| 990 |
if(isOdd(Integer.parseInt(match))) System.out.println(match); |
| 991 |
} |
| 992 |
|
| 993 |
static boolean isOdd(int i){ |
| 994 |
return (i&1)>0; |
| 995 |
} |
| 996 |
</pre> |
| 997 |
This outputs:<pre> |
| 998 |
123 |
| 999 |
1 |
| 1000 |
23 |
| 1001 |
3 |
| 1002 |
</pre> |
| 1003 |
Note that using <code>find()</code> method we would find '123' only.<DD><DL> |
| 1004 |
</DL> |
| 1005 |
</DD> |
| 1006 |
<DD><DL> |
| 1007 |
<DT><B>Parameters:</B><DD><CODE>options</CODE> - search options, some of ANCHOR_START|ANCHOR_END|ANCHOR_LASTMATCH|ACCEPT_INCOMPLETE; zero value(default) stands for usual search for substring.</DL> |
| 1008 |
</DD> |
| 1009 |
</DL> |
| 1010 |
<HR> |
| 1011 |
|
| 1012 |
<A NAME="skip()"><!-- --></A><H3> |
| 1013 |
skip</H3> |
| 1014 |
<PRE> |
| 1015 |
public final void <B>skip</B>()</PRE> |
| 1016 |
<DL> |
| 1017 |
<DD>Sets the current search position just after the end of last match.<DD><DL> |
| 1018 |
</DL> |
| 1019 |
</DD> |
| 1020 |
</DL> |
| 1021 |
<HR> |
| 1022 |
|
| 1023 |
<A NAME="toString()"><!-- --></A><H3> |
| 1024 |
toString</H3> |
| 1025 |
<PRE> |
| 1026 |
public java.lang.String <B>toString</B>()</PRE> |
| 1027 |
<DL> |
| 1028 |
<DD><DL> |
| 1029 |
<DT><B>Overrides:</B><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE></DL> |
| 1030 |
</DD> |
| 1031 |
</DL> |
| 1032 |
<HR> |
| 1033 |
|
| 1034 |
<A NAME="pattern()"><!-- --></A><H3> |
| 1035 |
pattern</H3> |
| 1036 |
<PRE> |
| 1037 |
public <A HREF="../jregex/Pattern.html">Pattern</A> <B>pattern</B>()</PRE> |
| 1038 |
<DL> |
| 1039 |
<DD><DL> |
| 1040 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#pattern()">pattern</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1041 |
</DD> |
| 1042 |
</DL> |
| 1043 |
<HR> |
| 1044 |
|
| 1045 |
<A NAME="target()"><!-- --></A><H3> |
| 1046 |
target</H3> |
| 1047 |
<PRE> |
| 1048 |
public java.lang.String <B>target</B>()</PRE> |
| 1049 |
<DL> |
| 1050 |
<DD><DL> |
| 1051 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#target()">target</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1052 |
</DD> |
| 1053 |
</DL> |
| 1054 |
<HR> |
| 1055 |
|
| 1056 |
<A NAME="targetChars()"><!-- --></A><H3> |
| 1057 |
targetChars</H3> |
| 1058 |
<PRE> |
| 1059 |
public char[] <B>targetChars</B>()</PRE> |
| 1060 |
<DL> |
| 1061 |
<DD><DL> |
| 1062 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#targetChars()">targetChars</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1063 |
</DD> |
| 1064 |
</DL> |
| 1065 |
<HR> |
| 1066 |
|
| 1067 |
<A NAME="targetStart()"><!-- --></A><H3> |
| 1068 |
targetStart</H3> |
| 1069 |
<PRE> |
| 1070 |
public int <B>targetStart</B>()</PRE> |
| 1071 |
<DL> |
| 1072 |
<DD><DL> |
| 1073 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#targetStart()">targetStart</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1074 |
</DD> |
| 1075 |
</DL> |
| 1076 |
<HR> |
| 1077 |
|
| 1078 |
<A NAME="targetEnd()"><!-- --></A><H3> |
| 1079 |
targetEnd</H3> |
| 1080 |
<PRE> |
| 1081 |
public int <B>targetEnd</B>()</PRE> |
| 1082 |
<DL> |
| 1083 |
<DD><DL> |
| 1084 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#targetEnd()">targetEnd</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1085 |
</DD> |
| 1086 |
</DL> |
| 1087 |
<HR> |
| 1088 |
|
| 1089 |
<A NAME="charAt(int)"><!-- --></A><H3> |
| 1090 |
charAt</H3> |
| 1091 |
<PRE> |
| 1092 |
public char <B>charAt</B>(int i)</PRE> |
| 1093 |
<DL> |
| 1094 |
<DD><DL> |
| 1095 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#charAt(int)">charAt</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1096 |
</DD> |
| 1097 |
</DL> |
| 1098 |
<HR> |
| 1099 |
|
| 1100 |
<A NAME="charAt(int, int)"><!-- --></A><H3> |
| 1101 |
charAt</H3> |
| 1102 |
<PRE> |
| 1103 |
public char <B>charAt</B>(int i, |
| 1104 |
int groupId)</PRE> |
| 1105 |
<DL> |
| 1106 |
<DD><DL> |
| 1107 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#charAt(int, int)">charAt</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1108 |
</DD> |
| 1109 |
</DL> |
| 1110 |
<HR> |
| 1111 |
|
| 1112 |
<A NAME="length()"><!-- --></A><H3> |
| 1113 |
length</H3> |
| 1114 |
<PRE> |
| 1115 |
public final int <B>length</B>()</PRE> |
| 1116 |
<DL> |
| 1117 |
<DD><DL> |
| 1118 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#length()">length</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1119 |
</DD> |
| 1120 |
</DL> |
| 1121 |
<HR> |
| 1122 |
|
| 1123 |
<A NAME="start()"><!-- --></A><H3> |
| 1124 |
start</H3> |
| 1125 |
<PRE> |
| 1126 |
public final int <B>start</B>()</PRE> |
| 1127 |
<DL> |
| 1128 |
<DD><DL> |
| 1129 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#start()">start</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1130 |
</DD> |
| 1131 |
</DL> |
| 1132 |
<HR> |
| 1133 |
|
| 1134 |
<A NAME="end()"><!-- --></A><H3> |
| 1135 |
end</H3> |
| 1136 |
<PRE> |
| 1137 |
public final int <B>end</B>()</PRE> |
| 1138 |
<DL> |
| 1139 |
<DD><DL> |
| 1140 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#end()">end</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1141 |
</DD> |
| 1142 |
</DL> |
| 1143 |
<HR> |
| 1144 |
|
| 1145 |
<A NAME="prefix()"><!-- --></A><H3> |
| 1146 |
prefix</H3> |
| 1147 |
<PRE> |
| 1148 |
public java.lang.String <B>prefix</B>()</PRE> |
| 1149 |
<DL> |
| 1150 |
<DD><DL> |
| 1151 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#prefix()">prefix</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1152 |
</DD> |
| 1153 |
</DL> |
| 1154 |
<HR> |
| 1155 |
|
| 1156 |
<A NAME="suffix()"><!-- --></A><H3> |
| 1157 |
suffix</H3> |
| 1158 |
<PRE> |
| 1159 |
public java.lang.String <B>suffix</B>()</PRE> |
| 1160 |
<DL> |
| 1161 |
<DD><DL> |
| 1162 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#suffix()">suffix</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1163 |
</DD> |
| 1164 |
</DL> |
| 1165 |
<HR> |
| 1166 |
|
| 1167 |
<A NAME="groupCount()"><!-- --></A><H3> |
| 1168 |
groupCount</H3> |
| 1169 |
<PRE> |
| 1170 |
public int <B>groupCount</B>()</PRE> |
| 1171 |
<DL> |
| 1172 |
<DD><DL> |
| 1173 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#groupCount()">groupCount</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1174 |
</DD> |
| 1175 |
</DL> |
| 1176 |
<HR> |
| 1177 |
|
| 1178 |
<A NAME="group(int)"><!-- --></A><H3> |
| 1179 |
group</H3> |
| 1180 |
<PRE> |
| 1181 |
public java.lang.String <B>group</B>(int n)</PRE> |
| 1182 |
<DL> |
| 1183 |
<DD><DL> |
| 1184 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#group(int)">group</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1185 |
</DD> |
| 1186 |
</DL> |
| 1187 |
<HR> |
| 1188 |
|
| 1189 |
<A NAME="group(java.lang.String)"><!-- --></A><H3> |
| 1190 |
group</H3> |
| 1191 |
<PRE> |
| 1192 |
public java.lang.String <B>group</B>(java.lang.String name)</PRE> |
| 1193 |
<DL> |
| 1194 |
<DD><DL> |
| 1195 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#group(java.lang.String)">group</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1196 |
</DD> |
| 1197 |
</DL> |
| 1198 |
<HR> |
| 1199 |
|
| 1200 |
<A NAME="getGroup(int, jregex.TextBuffer)"><!-- --></A><H3> |
| 1201 |
getGroup</H3> |
| 1202 |
<PRE> |
| 1203 |
public boolean <B>getGroup</B>(int n, |
| 1204 |
<A HREF="../jregex/TextBuffer.html">TextBuffer</A> tb)</PRE> |
| 1205 |
<DL> |
| 1206 |
<DD><DL> |
| 1207 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#getGroup(int, jregex.TextBuffer)">getGroup</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1208 |
</DD> |
| 1209 |
</DL> |
| 1210 |
<HR> |
| 1211 |
|
| 1212 |
<A NAME="getGroup(java.lang.String, jregex.TextBuffer)"><!-- --></A><H3> |
| 1213 |
getGroup</H3> |
| 1214 |
<PRE> |
| 1215 |
public boolean <B>getGroup</B>(java.lang.String name, |
| 1216 |
<A HREF="../jregex/TextBuffer.html">TextBuffer</A> tb)</PRE> |
| 1217 |
<DL> |
| 1218 |
<DD><DL> |
| 1219 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#getGroup(java.lang.String, jregex.TextBuffer)">getGroup</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1220 |
</DD> |
| 1221 |
</DL> |
| 1222 |
<HR> |
| 1223 |
|
| 1224 |
<A NAME="getGroup(int, java.lang.StringBuffer)"><!-- --></A><H3> |
| 1225 |
getGroup</H3> |
| 1226 |
<PRE> |
| 1227 |
public boolean <B>getGroup</B>(int n, |
| 1228 |
java.lang.StringBuffer sb)</PRE> |
| 1229 |
<DL> |
| 1230 |
<DD><DL> |
| 1231 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#getGroup(int, java.lang.StringBuffer)">getGroup</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1232 |
</DD> |
| 1233 |
</DL> |
| 1234 |
<HR> |
| 1235 |
|
| 1236 |
<A NAME="getGroup(java.lang.String, java.lang.StringBuffer)"><!-- --></A><H3> |
| 1237 |
getGroup</H3> |
| 1238 |
<PRE> |
| 1239 |
public boolean <B>getGroup</B>(java.lang.String name, |
| 1240 |
java.lang.StringBuffer sb)</PRE> |
| 1241 |
<DL> |
| 1242 |
<DD><DL> |
| 1243 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#getGroup(java.lang.String, java.lang.StringBuffer)">getGroup</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1244 |
</DD> |
| 1245 |
</DL> |
| 1246 |
<HR> |
| 1247 |
|
| 1248 |
<A NAME="groups()"><!-- --></A><H3> |
| 1249 |
groups</H3> |
| 1250 |
<PRE> |
| 1251 |
public java.lang.String[] <B>groups</B>()</PRE> |
| 1252 |
<DL> |
| 1253 |
<DD><DL> |
| 1254 |
</DL> |
| 1255 |
</DD> |
| 1256 |
</DL> |
| 1257 |
<HR> |
| 1258 |
|
| 1259 |
<A NAME="groupv()"><!-- --></A><H3> |
| 1260 |
groupv</H3> |
| 1261 |
<PRE> |
| 1262 |
public java.util.Vector <B>groupv</B>()</PRE> |
| 1263 |
<DL> |
| 1264 |
<DD><DL> |
| 1265 |
</DL> |
| 1266 |
</DD> |
| 1267 |
</DL> |
| 1268 |
<HR> |
| 1269 |
|
| 1270 |
<A NAME="isCaptured()"><!-- --></A><H3> |
| 1271 |
isCaptured</H3> |
| 1272 |
<PRE> |
| 1273 |
public final boolean <B>isCaptured</B>()</PRE> |
| 1274 |
<DL> |
| 1275 |
<DD><DL> |
| 1276 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#isCaptured()">isCaptured</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1277 |
</DD> |
| 1278 |
</DL> |
| 1279 |
<HR> |
| 1280 |
|
| 1281 |
<A NAME="isCaptured(int)"><!-- --></A><H3> |
| 1282 |
isCaptured</H3> |
| 1283 |
<PRE> |
| 1284 |
public final boolean <B>isCaptured</B>(int id)</PRE> |
| 1285 |
<DL> |
| 1286 |
<DD><DL> |
| 1287 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#isCaptured(int)">isCaptured</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1288 |
</DD> |
| 1289 |
</DL> |
| 1290 |
<HR> |
| 1291 |
|
| 1292 |
<A NAME="isCaptured(java.lang.String)"><!-- --></A><H3> |
| 1293 |
isCaptured</H3> |
| 1294 |
<PRE> |
| 1295 |
public final boolean <B>isCaptured</B>(java.lang.String groupName)</PRE> |
| 1296 |
<DL> |
| 1297 |
<DD><DL> |
| 1298 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#isCaptured(java.lang.String)">isCaptured</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1299 |
</DD> |
| 1300 |
</DL> |
| 1301 |
<HR> |
| 1302 |
|
| 1303 |
<A NAME="length(int)"><!-- --></A><H3> |
| 1304 |
length</H3> |
| 1305 |
<PRE> |
| 1306 |
public final int <B>length</B>(int id)</PRE> |
| 1307 |
<DL> |
| 1308 |
<DD><DL> |
| 1309 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#length(int)">length</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1310 |
</DD> |
| 1311 |
</DL> |
| 1312 |
<HR> |
| 1313 |
|
| 1314 |
<A NAME="start(int)"><!-- --></A><H3> |
| 1315 |
start</H3> |
| 1316 |
<PRE> |
| 1317 |
public final int <B>start</B>(int id)</PRE> |
| 1318 |
<DL> |
| 1319 |
<DD><DL> |
| 1320 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#start(int)">start</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1321 |
</DD> |
| 1322 |
</DL> |
| 1323 |
<HR> |
| 1324 |
|
| 1325 |
<A NAME="end(int)"><!-- --></A><H3> |
| 1326 |
end</H3> |
| 1327 |
<PRE> |
| 1328 |
public final int <B>end</B>(int id)</PRE> |
| 1329 |
<DL> |
| 1330 |
<DD><DL> |
| 1331 |
<DT><B>Specified by: </B><DD><CODE><A HREF="../jregex/MatchResult.html#end(int)">end</A></CODE> in interface <CODE><A HREF="../jregex/MatchResult.html">MatchResult</A></CODE></DL> |
| 1332 |
</DD> |
| 1333 |
</DL> |
| 1334 |
<HR> |
| 1335 |
|
| 1336 |
<A NAME="toString_d()"><!-- --></A><H3> |
| 1337 |
toString_d</H3> |
| 1338 |
<PRE> |
| 1339 |
public java.lang.String <B>toString_d</B>()</PRE> |
| 1340 |
<DL> |
| 1341 |
<DD><DL> |
| 1342 |
</DL> |
| 1343 |
</DD> |
| 1344 |
</DL> |
| 1345 |
<!-- ========= END OF CLASS DATA ========= --> |
| 1346 |
<HR> |
| 1347 |
|
| 1348 |
<!-- ========== START OF NAVBAR ========== --> |
| 1349 |
<A NAME="navbar_bottom"><!-- --></A> |
| 1350 |
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> |
| 1351 |
<TR> |
| 1352 |
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| 1353 |
<A NAME="navbar_bottom_firstrow"><!-- --></A> |
| 1354 |
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> |
| 1355 |
<TR ALIGN="center" VALIGN="top"> |
| 1356 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| 1357 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> |
| 1358 |
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> |
| 1359 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| 1360 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| 1361 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| 1362 |
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> |
| 1363 |
</TR> |
| 1364 |
</TABLE> |
| 1365 |
</TD> |
| 1366 |
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> |
| 1367 |
</EM> |
| 1368 |
</TD> |
| 1369 |
</TR> |
| 1370 |
|
| 1371 |
<TR> |
| 1372 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 1373 |
PREV CLASS |
| 1374 |
<A HREF="../jregex/Optimizer.html"><B>NEXT CLASS</B></A></FONT></TD> |
| 1375 |
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| 1376 |
<A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> |
| 1377 |
<A HREF="Matcher.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> |
| 1378 |
</TR> |
| 1379 |
<TR> |
| 1380 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 1381 |
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| 1382 |
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| 1383 |
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| 1384 |
</TR> |
| 1385 |
</TABLE> |
| 1386 |
<!-- =========== END OF NAVBAR =========== --> |
| 1387 |
|
| 1388 |
<HR> |
| 1389 |
|
| 1390 |
</BODY> |
| 1391 |
</HTML> |