接口的使用
org.apache.oro.text.regex.PatternMatcher
使用PatternMatcher的程序包
程序包
说明
This package used to be the TextTools library and provides general
text processing support, including a glob regular expression class,
pattern caching and line-by-line processing classes.
This package used to be the AwkTools library and provides AWK-like
regular expression classes that implement the
org.apache.oro.text.regex interfaces.This package used to be the OROMatcher library and provides both
generic regular expression interfaces and Perl5 regular expression
compatible implementation classes.
-
org.apache.oro.text中PatternMatcher的使用
参数类型为PatternMatcher的org.apache.oro.text中的构造器限定符构造器说明MatchActionProcessor(PatternCompiler compiler, PatternMatcher matcher) Creates a new MatchActionProcessor instance initialized with the specified pattern compiler and matcher. -
org.apache.oro.text.awk中PatternMatcher的使用
修饰符和类型类说明final classThe AwkMatcher class is used to match regular expressions (conforming to the Awk regular expression syntax) generated by AwkCompiler. -
org.apache.oro.text.regex中PatternMatcher的使用
修饰符和类型类说明final classThe Perl5Matcher class is used to match regular expressions (conforming to the Perl5 regular expression syntax) generated by Perl5Compiler.参数类型为PatternMatcher的org.apache.oro.text.regex中的方法修饰符和类型方法说明voidPerl5Substitution.appendSubstitution(StringBuffer appendBuffer, MatchResult match, int substitutionCount, PatternMatcherInput originalInput, PatternMatcher matcher, Pattern pattern) Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far.voidStringSubstitution.appendSubstitution(StringBuffer appendBuffer, MatchResult match, int substitutionCount, PatternMatcherInput originalInput, PatternMatcher matcher, Pattern pattern) Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far.voidSubstitution.appendSubstitution(StringBuffer appendBuffer, MatchResult match, int substitutionCount, PatternMatcherInput originalInput, PatternMatcher matcher, Pattern pattern) Appends the substitution to a buffer containing the original input with substitutions applied for the pattern matches found so far.static voidUtil.split(Collection results, PatternMatcher matcher, Pattern pattern, String input) Splits up aStringinstance and stores results as aCollectionof all its substrings using a regular expression as the delimiter.static voidUtil.split(Collection results, PatternMatcher matcher, Pattern pattern, String input, int limit) Splits up aStringinstance and stores results as aListof substrings numbering no more than a specified limit.static VectorUtil.split(PatternMatcher matcher, Pattern pattern, String input) 已过时。static VectorUtil.split(PatternMatcher matcher, Pattern pattern, String input, int limit) 已过时。static intUtil.substitute(StringBuffer result, PatternMatcher matcher, Pattern pattern, Substitution sub, String input, int numSubs) Searches a string for a pattern and replaces the first occurrences of the pattern with a Substitution up to the number of substitutions specified by the numSubs parameter.static intUtil.substitute(StringBuffer result, PatternMatcher matcher, Pattern pattern, Substitution sub, PatternMatcherInput input, int numSubs) Searches a string for a pattern and replaces the first occurrences of the pattern with a Substitution up to the number of substitutions specified by the numSubs parameter.static StringUtil.substitute(PatternMatcher matcher, Pattern pattern, Substitution sub, String input) Searches a string for a pattern and substitutes only the first occurence of the pattern.static StringUtil.substitute(PatternMatcher matcher, Pattern pattern, Substitution sub, String input, int numSubs) Searches a string for a pattern and replaces the first occurrences of the pattern with a Substitution up to the number of substitutions specified by the numSubs parameter.
Util.split(Collection, PatternMatcher, Pattern, String)instead.