Regular Expressions in Java

Package com.stevenrbrandt.ubiq2.v15.pattwo

Blog
Home
Book
Mugs, T-shirts Pattwo License
support
old site


Donate towards my web hosting bill!

Welcome

Package Pattwo (updated 05/22/2009): Package pattwo is a new, from scratch, regular expression implementation that conforms (mostly) to the interface established by java.util.regex.
Some differences include:
  1. No stack overflows or out of memory errors. Ever. In fact, you could use it in a MIDlet.
  2. No backwards searches, i.e. (?<=X), (?<!X)
  3. No && inside entities, e.g. [[abc]&&[def]]. Only simple perl-type entity descriptions.
  4. Matcher can take a Reader object.
  5. Package name. To use it, replace "import java.util.regex.*" with "import com.stevenrbrandt.ubiq2.v15.pattwo.*".
Downloads: Brief Release Notes:
  • v15: Fixed a bug with \Q ... \E
  • v14: Target & runtime library compatible with Java 1.3.
  • v13: Encapsulated references to Hashtable and Vector, making it easy for a user to replace with ArrayList or HashMap.
  • v12: Converted sources to be compatible with version 1.2
  • v11: Fixed bug parsing \1 type patterns.
  • v10: Fixed some transparent boundary issues.
  • v9: added support for transparent bounds and made some bug fixes.
  • v8: Fixed an issue with hitEnd().
  • v7: Fixed various issues with $ and ^.
  • v6:
    1. added useAnchoringBounds() / hasAnchoringBounds()
    2. fixed a bug relating to the [,\s] pattern and those like it.
  • v5:
    1. Made hitEnd() work properly.
    2. Added regions.
    3. Bug fixes that affected patterns using alternations on group 0.
  • v4: Many bug fixes relating to patterns similar to (a*)*, [-a], [a-].
  • v1: Initail release