SAP NetWeaver '04

com.sapportals.wcm.util.regex
Class Matcher

[contained in: com.sap.netweaver.bc.util.par - bc.util.public_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.util.regex.Matcher

public class Matcher
extends java.lang.Object

Provides a matcher object for a given regular expression pattern.


Constructor Summary
Matcher(Pattern pattern, java.lang.String input)
           
 
Method Summary
 void appendReplacement(java.lang.StringBuffer sb, java.lang.String replacement)
          Implements a non-terminal append-and-replace step.
 void appendTail(java.lang.StringBuffer sb)
          Implements a terminal append-and-replace step.
 int end()
          Returns the end index of the previous match.
 int end(int group)
          Returns the end index of the subsequence captured by the given group during the previous match operation.
 boolean find()
          Attempts to find the next subsequence of the input sequence that matches the pattern.
 java.lang.String group()
          Returns the input subsequence matched by the previous match.
 java.lang.String group(int group)
          Returns the input subsequence captured by the given group during the previous match operation.
 int groupCount()
          Returns the number of capturing groups in this matcher's pattern.
 boolean lookingAt()
          Attempts to match the input sequence, starting at the beginning, against the pattern.
 boolean matches()
          Attempts to match the entire input sequence against the pattern.
 Pattern pattern()
          Returns the pattern that is interpreted by this matcher.
 java.lang.String replaceAll(java.lang.String replacement)
          Replaces every subsequence of the input sequence that matches the pattern with the given replacement string.
 void reset()
          Resets this matcher.
 void reset(CharSequence input)
          Resets this matcher with a new input sequence.
 int start()
          Returns the start index of the previous match.
 int start(int group)
          Returns the start index of the subsequence captured by the given group during the previous match operation.}
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Matcher

public Matcher(Pattern pattern,
               java.lang.String input)
Method Detail

appendReplacement

public void appendReplacement(java.lang.StringBuffer sb,
                              java.lang.String replacement)
Implements a non-terminal append-and-replace step.
Parameters:
sb - TBD: Description of the incoming method parameter
replacement - TBD: Description of the incoming method parameter

appendTail

public void appendTail(java.lang.StringBuffer sb)
Implements a terminal append-and-replace step.
Parameters:
sb - TBD: Description of the incoming method parameter

end

public int end()
Returns the end index of the previous match.
Returns:
TBD: Description of the outgoing return value

end

public int end(int group)
Returns the end index of the subsequence captured by the given group during the previous match operation.
Parameters:
group - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

find

public boolean find()
Attempts to find the next subsequence of the input sequence that matches the pattern.
Returns:
TBD: Description of the outgoing return value

group

public java.lang.String group()
Returns the input subsequence matched by the previous match.
Returns:
TBD: Description of the outgoing return value

group

public java.lang.String group(int group)
Returns the input subsequence captured by the given group during the previous match operation.
Parameters:
group - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

groupCount

public int groupCount()
Returns the number of capturing groups in this matcher's pattern.
Returns:
TBD: Description of the outgoing return value

lookingAt

public boolean lookingAt()
Attempts to match the input sequence, starting at the beginning, against the pattern.
Returns:
TBD: Description of the outgoing return value

matches

public boolean matches()
Attempts to match the entire input sequence against the pattern.
Returns:
TBD: Description of the outgoing return value

pattern

public Pattern pattern()
Returns the pattern that is interpreted by this matcher.
Returns:
TBD: Description of the outgoing return value

replaceAll

public java.lang.String replaceAll(java.lang.String replacement)
Replaces every subsequence of the input sequence that matches the pattern with the given replacement string.
Parameters:
replacement - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

reset

public void reset()
Resets this matcher.

reset

public void reset(CharSequence input)
Resets this matcher with a new input sequence.
Parameters:
input - TBD: Description of the incoming method parameter

start

public int start()
Returns the start index of the previous match.
Returns:
TBD: Description of the outgoing return value

start

public int start(int group)
Returns the start index of the subsequence captured by the given group during the previous match operation.}
Parameters:
group - TBD: Description of the incoming method parameter
Returns:
TBD: Description of the outgoing return value

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.