| 1 | {{{ |
| 2 | #!html |
| 3 | |
| 4 | <h1>Regular Expressions in Arboreal</h1> |
| 5 | |
| 6 | <p>Arboreal allows for regular expression searches, using the syntax |
| 7 | of <b>Perl 5.003</b> regular expressions. The regular expression |
| 8 | library used is <a |
| 9 | href="http://jakarta.apache.org/oro/index.html">Jakarta ORO</a>.</p> |
| 10 | |
| 11 | <p>A summary of the regular expression syntax is available in the <a |
| 12 | href="jakarta-oro-2.0.6/docs/api/org/apache/oro/text/regex/package-summary.html#perl5re">API documentation</a>.</p> |
| 13 | |
| 14 | <h3>A note on parenthesized groups</h3> |
| 15 | |
| 16 | <p>If a regular expression contains <b>at least one</b> parenthesized |
| 17 | group, Arboreal will highlight in the search results <b>only</b> the |
| 18 | contents of the parenthesized groups. E.g., a search for |
| 19 | <tt>([Tt]his).*?(sentence)</tt> will produce results such as the |
| 20 | following:</p> |
| 21 | |
| 22 | <blockquote><i><span class="hilite">This</span> short <span |
| 23 | class="hilite">sentence</span> illustrates the point.</i></blockquote> |
| 24 | |
| 25 | <p>This feature allows one easily to construct searches, the results |
| 26 | of which can be dragged onto a term in the term editor to add |
| 27 | instances.</p> |
| 28 | }}} |