ORO, Inc. Logo

CONTENTS

PREFACE

COPYRIGHT AND LICENSE

INTRODUCTION

Installation
Acknowledgements

FAQ

SYNTAX

What is a regular expression?
Perl5 regular expressions

THE INTERFACES

Pattern
PatternCompiler
PatternMatcher
MatchResult

THE CLASSES

Perl5Pattern
Perl5Compiler
Perl5Matcher
PatternMatcherInput
Perl5StreamInput
Util
Perl5Debug

SAMPLE PROGRAMS

MatchResult example
Difference between matches() and contains()
Case sensitivity
Searching an InputStream
Splits
Substitutions

APPENDIX

Package API reference (javadoc generated)
      

Introduction


OROMatcher TM is a set of regular expression pattern matching and utility classes for Java descended from a package originally written by Daniel F. Savarese , a Ph.D. student at the University of Maryland College Park. While OROMatcher TM retains vestiges of the original package in terms of design (namely the MatchResult and PatternMatcher interfaces), it is an entirely new package in terms of implementation and functionality. While there are several other regular expression packages for Java, both free and commercial, most of them suffer from flaws in performance, functionality, and correctness of implementation. To the best of our determination, OROMatcher TM exceeds all other Java regular expression packages in all those areas. Original Reusable Objects, Inc. (ORO, Inc.) is committed to providing the highest levels of quality in all of its products.

We are especially attuned to the desires of the users of our software, who have already greatly contributed to OROMatcher's feature set through their insightful comments and suggestions. We believe the users of our software are best able to determine what functionality needs to be added, removed, or redesigned. Therefore we actively solicit comments, suggestions, and bug reports from our users. You can email suggestions to suggestions@oroinc.com and bug reports to bugs@oroinc.com . If applicable, please include the product name in the subject of your email.

Today OROMatcher TM is used by hundreds of programmers on a daily basis to add the power of regular expressions to their Java applications and applets. OROMatcher TM will continue to be freely distributed by ORO, Inc. for the benefit of the Java programming community. Because we do not charge for use of OROMatcher TM, we cannot guarantee technical support, but we will give priority, as with all our products, to fixing reported bugs.

Currenly we want the package to be usable with the 1.0.2 and 1.1.* JDK's. But we will release a 1.1 enhanced version of the package leveraging the 1.1 features, such as serializability, that our users want. At that point we will distribute both 1.0.2 and 1.1 versions of the classes.

Installation

For simplicity we have decided to not to wrap up the OROMatcher TM class files in a zip or JAR file. Therefore, to make use of OROMatcher TM, all you have to do is place the directory structure rooted at com/ into a directory of your own choosing. Then simply add that directory to your CLASSPATH environment variable.

Acknowledgements

There are many people who we would like to thank for their suggestions and early support during beta-testing. Unfortunately, we can't list them all. But we'd like to take a stab at thanking a few. We'd like to thank Michael Forte of Sun Microsytems for his early support for an earlier incarnation of the package, Martin Fong of SRI for enthusiastic beta-testing, Louis-David Mitterand of Zoom.Com for some extremely helpful debugging, Jeffrey Friedl author of Mastering Regular Expressions from O'Reilly & Associates for testing a version of the package with his infamous test suite, Alex Tang from Netscape for stressing a late beta in commercial work, and Brian Zak of Actra Business Systems for his invaluable beta-testing. We also want to thank the many programmers who have used OROMatcher TM in earlier incarnations and beta versions.
Copyright © 1997 ORO, Inc. All rights reserved. Original Reusable Objects, ORO, the ORO logo, and "Component software for the Internet" are trademarks or registered trademarks of ORO, Inc. in the United States and other countries.
Java is a trademark of Sun Microsystems. All other trademarks are the property of their respective holders.