maiolum.util
Class RegexpMatcher

java.lang.Object
  extended bymaiolum.util.RegexpMatcher

public class RegexpMatcher
extends java.lang.Object

RegexpMatcher allows to return all matched groups in regular expression as array of strings (similar to PHP's preg_match_all() function.

Version:
1.0
Author:
Robert Novotny
See Also:
Matcher

Constructor Summary
RegexpMatcher()
           
 
Method Summary
static java.lang.String[] matchAll(java.lang.String regexp, java.lang.String input)
          Retrieves all groups from string input that match the regular expression pattern regexp.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RegexpMatcher

public RegexpMatcher()
Method Detail

matchAll

public static java.lang.String[] matchAll(java.lang.String regexp,
                                          java.lang.String input)
                                   throws java.lang.IllegalStateException
Retrieves all groups from string input that match the regular expression pattern regexp.

Returns:
array of strings representing all matched groups. This array of strings contains whole string as 0-th item.
Throws:
java.lang.IllegalStateException - if no matching groups were found