本文整理了Java中java.util.regex.Matcher.requireEnd()
方法的一些代码示例,展示了Matcher.requireEnd()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Matcher.requireEnd()
方法的具体详情如下:
包路径:java.util.regex.Matcher
类名称:Matcher
方法名:requireEnd
[英]Boolean indicating whether or not more input could change a positive match into a negative one. If requireEnd is true, and a match was found, then more input could cause the match to be lost. If requireEnd is false and a match was found, then more input might change the match but the match won't be lost. If a match was not found, then requireEnd has no meaning.
[中]布尔值,指示多个输入是否可以将正匹配更改为负匹配。如果requireEnd为true,并且找到了匹配项,那么更多的输入可能会导致匹配项丢失。如果Required为false并找到匹配项,则更多输入可能会更改匹配项,但匹配项不会丢失。如果未找到匹配项,则Required没有任何意义。
代码示例来源:origin: jphp-group/jphp
@FastMethod
@Signature
public Memory requireEnd(Environment env, Memory... args) {
return matcher.requireEnd() ? Memory.TRUE : Memory.FALSE;
}
代码示例来源:origin: org.kitesdk/kite-morphlines-core
/**
* Returns true if more input could change a positive match into a negative one.
*
* @return true iff more input could change a positive match into a negative one.
*/
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: kite-sdk/kite
/**
* Returns true if more input could change a positive match into a negative one.
*
* @return true iff more input could change a positive match into a negative one.
*/
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: com.github.rwitzel.streamflyer/streamflyer-core
/**
* @see com.github.rwitzel.streamflyer.regex.OnStreamMatcher#requireEnd()
*/
@Override
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: com.googlecode.streamflyer/streamflyer-core
/**
* @see com.googlecode.streamflyer.regex.OnStreamMatcher#requireEnd()
*/
@Override
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: sonia.regexp/named-regexp
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: dhanji/loop
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: net.loomchild/segment
public boolean requireEnd() {
return matcher.requireEnd();
}
代码示例来源:origin: stackoverflow.com
public static void main(final String... args)
{
final Pattern p = Pattern.compile("cat$");
final Matcher m = p.matcher("I have a cat");
m.find(); // finds a match
System.out.println(m.requireEnd()); // prints true
}
代码示例来源:origin: virjar/vscrawler
while (matcher.find() && matcher.end() == remaining.length() && matcher.requireEnd()) {
if (read(readBuffer, 0, 1) >= 0) {
matcher = rs.matcher(remaining);
内容来源于网络,如有侵权,请联系作者删除!