org.gjt.sp.jedit.search
Class PatternSearchMatcher
java.lang.Object
org.gjt.sp.jedit.search.SearchMatcher
org.gjt.sp.jedit.search.PatternSearchMatcher
public class PatternSearchMatcher
- extends SearchMatcher
A regular expression string matcher using java.util.regex.
- Since:
- jEdit 4.3pre5
- See Also:
Pattern
Constructor Summary |
PatternSearchMatcher(java.util.regex.Pattern re,
boolean ignoreCase)
Creates a new regular expression already compiled. |
PatternSearchMatcher(java.lang.String search,
boolean ignoreCase)
Creates a new regular expression string matcher. |
Method Summary |
boolean |
isMatchingEOL()
Returns whether the matcher is matching the end of the line
character. |
SearchMatcher.Match |
nextMatch(java.lang.CharSequence text,
boolean start,
boolean end,
boolean firstTime,
boolean reverse)
Returns the offset of the first match of the specified text
within this matcher. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PatternSearchMatcher
public PatternSearchMatcher(java.lang.String search,
boolean ignoreCase)
- Creates a new regular expression string matcher.
- Parameters:
search
- the search patternignoreCase
- true
if you want to ignore case- Since:
- jEdit 4.3pre5
- See Also:
Pattern
PatternSearchMatcher
public PatternSearchMatcher(java.util.regex.Pattern re,
boolean ignoreCase)
- Creates a new regular expression already compiled.
- Parameters:
re
- the compiled regexignoreCase
- true
if you want to ignore case- Since:
- jEdit 4.3pre13
- See Also:
Pattern
nextMatch
public SearchMatcher.Match nextMatch(java.lang.CharSequence text,
boolean start,
boolean end,
boolean firstTime,
boolean reverse)
- Returns the offset of the first match of the specified text
within this matcher.
- Specified by:
nextMatch
in class SearchMatcher
- Parameters:
text
- The text to search instart
- True if the start of the segment is the beginning
of the bufferend
- True if the end of the segment is the end of the
bufferfirstTime
- If false and the search string matched at the
start offset with length zero, automatically
find next matchreverse
- Unsupported for PatternSearchMatcher. Should
always be "false".
- Returns:
- A
SearchMatcher.Match
object. - Since:
- jEdit 4.3pre5
isMatchingEOL
public boolean isMatchingEOL()
- Description copied from class:
SearchMatcher
- Returns whether the matcher is matching the end of the line
character. This should be used to adjust the matched region
size when matching the end-of-line character, since it's not
included in the matched region returned by the
java.util.regex.Pattern matcher.
- Overrides:
isMatchingEOL
in class SearchMatcher
- Returns:
- Whether the end of the match region will be the EOL
character.
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object