net.sf.json.regexp
Class Perl5RegexpMatcher

java.lang.Object
  extended by net.sf.json.regexp.Perl5RegexpMatcher
All Implemented Interfaces:
RegexpMatcher

public class Perl5RegexpMatcher
extends Object
implements RegexpMatcher

Jakarta-oro RegexpMatcher Implementation.
Runs on older JVMs (1.3.1). You must have oro-2.0.8.jar configured in your classpath.

Author:
Andres Almiray

Constructor Summary
Perl5RegexpMatcher(String pattern)
           
Perl5RegexpMatcher(String pattern, boolean multiline)
           
 
Method Summary
 String getGroupIfMatches(String str, int group)
          Returns the specified group if the string matches the Pattern.
The Pattern will be managed internally by the RegexpMatcher implementation.
 boolean matches(String str)
          Returns true is the string macthes the Pattern.
The Pattern will be managed internally by the RegexpMatcher implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Perl5RegexpMatcher

public Perl5RegexpMatcher(String pattern)

Perl5RegexpMatcher

public Perl5RegexpMatcher(String pattern,
                          boolean multiline)
Method Detail

getGroupIfMatches

public String getGroupIfMatches(String str,
                                int group)
Description copied from interface: RegexpMatcher
Returns the specified group if the string matches the Pattern.
The Pattern will be managed internally by the RegexpMatcher implementation.

Specified by:
getGroupIfMatches in interface RegexpMatcher

matches

public boolean matches(String str)
Description copied from interface: RegexpMatcher
Returns true is the string macthes the Pattern.
The Pattern will be managed internally by the RegexpMatcher implementation.

Specified by:
matches in interface RegexpMatcher