APTCONVERT 1.1

fr.pixware.util
Interface RE


public interface RE

An abstraction of a regular expression matcher.

See Also:
REFactory

Method Summary
 REMatch[] getMatch(java.lang.CharSequence input, int from)
          Works like getMatch(String, int) but searches more generic CharSequence.
 REMatch[] getMatch(java.lang.String input, int from)
          Searches the specified string for this regular expression pattern.
 boolean search(java.lang.String input)
          Searches the specified string for this regular expression pattern.
 

Method Detail

search

public boolean search(java.lang.String input)
Searches the specified string for this regular expression pattern.

Parameters:
input - the string to search
Returns:
true if the pattern is found; false otherwise

You have to put the pattern between '^' and '$' if you need the string to be matched in its entirety.


getMatch

public REMatch[] getMatch(java.lang.String input,
                          int from)
Searches the specified string for this regular expression pattern.

Parameters:
input - the string to search
from - the index from which to begin the search
Returns:
matched text spans if the pattern is found; null otherwise

First REMatch of the returned array contains the text span matched by this pattern in its entirety. Following REMatch, if any, correspond to text spans matched by parenthesized subexpressions of this pattern.


getMatch

public REMatch[] getMatch(java.lang.CharSequence input,
                          int from)
Works like getMatch(String, int) but searches more generic CharSequence.


APTCONVERT 1.1