Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## gnu.regexp
Class RESearchMatcher

    java.lang.Object
      gnu.regexp.RESearchMatcher

All Implemented Interfaces:
  SearchMatcher

    public class RESearchMatcher

extends java.lang.Object
implements SearchMatcher

A regular expression string matcher.

Version:
  $Id: RESearchMatcher.java,v 1.1 2004/05/05 10:44:25 jferber Exp $
Author:
  Slava Pestov

Field Summary
`static RESyntax` | `RE_SYNTAX_JEXT` Perl5 syntax with character classes enabled.

Constructor Summary
`RESearchMatcher(java.lang.String search, java.lang.String replace, boolean ignoreCase, boolean script, java.lang.String pythonScript)` Creates a new regular expression string matcher.

Method Summary
`int[]` | `nextMatch(javax.swing.text.Segment 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`

Field Detail

### RE_SYNTAX_JEXT

    public static final RESyntax RE_SYNTAX_JEXT

  Perl5 syntax with character classes enabled.

  Since:
    jEdit 3.0pre5

Constructor Detail

### RESearchMatcher

    public RESearchMatcher(java.lang.String search,
                           java.lang.String replace,
                           boolean ignoreCase,
                           boolean script,
                           java.lang.String pythonScript)
                    throws java.lang.Exception

  Creates a new regular expression string matcher.

  Throws:
    `java.lang.Exception`

Method Detail

### nextMatch

    public int[] nextMatch(javax.swing.text.Segment 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)
                                throws java.lang.Exception

  Returns the specified text, with any substitution specified within this matcher performed.

  Specified by:
    `substitute` in interface `SearchMatcher`
  Parameters:
    `text` - The text
  Returns:
    The changed string
  Throws:
    `java.lang.Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © Madkit Team (O. Gutknecht, J. Ferber, F. Michel et al.) All Rights Reserved.