ponderToolkit.editor.search
Class RESearchMatcher

java.lang.Object
  |
  +--ponderToolkit.editor.search.RESearchMatcher
All Implemented Interfaces:
SearchMatcher

public class RESearchMatcher
extends java.lang.Object
implements SearchMatcher

A regular expression string matcher.


Constructor Summary
RESearchMatcher(java.lang.String search, java.lang.String replace, boolean ignoreCase)
          Creates a new regular expression string matcher.
 
Method Summary
 int[] nextMatch(java.lang.String text)
          Returns the offset of the first match of the specified text within this matcher.
 java.lang.String substitute(java.lang.String text)
          Returns the specified text, with any substitution specified within this matcher performed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RESearchMatcher

public RESearchMatcher(java.lang.String search,
                       java.lang.String replace,
                       boolean ignoreCase)
Creates a new regular expression string matcher.
Parameters:
search - The search string
replace - The replacement string
ignoreCase - True if the matcher should be case insensitive, false otherwise
Method Detail

nextMatch

public int[] nextMatch(java.lang.String text)
Returns the offset of the first match of the specified text within this matcher.
Specified by:
nextMatch in interface SearchMatcher
Parameters:
text - The text to search in
Returns:
an array where the first element is the start offset of the match, and the second element is the end offset of the match

substitute

public java.lang.String substitute(java.lang.String text)
Returns the specified text, with any substitution specified within this matcher performed.
Specified by:
substitute in interface SearchMatcher
Parameters:
text - The text