Regular Expressions in Java

Package com.stevesoft.pat version 1.5.3

Mugs, T-shirts Comments/Raves
New in 1.5.3
A Game
An Online Test

Download Free

 If you need a non-LGPL version
You Can Buy!

Online help...
Quick Start
Tutorial Part 1
Tutorial Part 2
Tutorial Part 3
Tutorial Part 4
Tutorial Part 5
Tutorial Part 6

Useful apps...
Java Beautifier
Code Colorizer
GUI Grep
Swing Grep

Other stuff...


  • This example shows some very basic usage of the package. It should help you get a quick start on things.
  • This shows you how to make your own patterns with package com.stevesoft.pat.
  • More examples of how to make your own patterns.
  • This shows you how to define your own replacement rules in package pat.
  • This is a speed test of package pat in finding a literal substring, comparing it against String's indexOf() method. Speed is similar. In some rare cases pat is faster.
  • Like StringTokenizer, but different.
  • An example of how to use the Transformer. This carries out several substituions simultaneously. You can, for example, swap all instances of foo with bar and vice-versa.
  • shows you how to search a char[] with package pat.
  • shows you how to search a random access file with package pat.
  • shows you how to capture the result of a replace to a different place than a StringBuffer.

Weird and perhaps aesthetically displeasing stuff...