软件包 | 描述 |
---|---|
java.util |
包含集合框架、遗留的集合类、事件模型、日期和时间的设施、国际化和各种实用工具类(一个字符串标记,一个随机数发生器,和一位阵列)。
|
java.util.regex |
用于对正则表达式指定的模式匹配字符序列的类。
|
Modifier and Type | Method and Description |
---|---|
Pattern |
Scanner.delimiter()
返回
Pattern 这
Scanner 目前使用匹配符。
|
Modifier and Type | Method and Description |
---|---|
String |
Scanner.findInLine(Pattern pattern)
试图找到指定的模式忽略分隔符下发生。
|
String |
Scanner.findWithinHorizon(Pattern pattern, int horizon)
试图找到指定模式的下一个发生。
|
boolean |
Scanner.hasNext(Pattern pattern)
如果下一个完整的标记与指定的模式匹配,则返回真。
|
String |
Scanner.next(Pattern pattern)
返回下一个标记,如果它与指定的模式相匹配。
|
Scanner |
Scanner.skip(Pattern pattern)
跳过输入匹配指定模式,忽略分隔符。
|
Scanner |
Scanner.useDelimiter(Pattern pattern)
设置扫描仪的界定模式指定的模式。
|
Modifier and Type | Method and Description |
---|---|
static Pattern |
Pattern.compile(String regex)
将给定的正则表达式编译成模式。
|
static Pattern |
Pattern.compile(String regex, int flags)
用给定的标志将给定的正则表达式编译成一个模式。
|
Pattern |
Matcher.pattern()
返回的模式,通过匹配的解释。
|
Modifier and Type | Method and Description |
---|---|
Matcher |
Matcher.usePattern(Pattern newPattern)
变化的
Pattern这
Matcher使用找火柴。
|
Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2014, Oracle and/or its affiliates. All rights reserved.