美文网首页
Java: Boundary matchers

Java: Boundary matchers

作者: 小城大麦 | 来源:发表于2016-03-03 18:23 被阅读29次

参考:Pattern
Boundary matchers

^   The beginning of a line
$   The end of a line
\b  A word boundary
\B  A non-word boundary
\A  The beginning of the input
\G  The end of the previous match
\Z  The end of the input but for the final terminator, if any
\z  The end of the input

Scanner中使用读取流的结束

 Scanner(istream, charsetName).useDelimiter("\\Z").next();

相关文章

网友评论

      本文标题:Java: Boundary matchers

      本文链接:https://www.haomeiwen.com/subject/epqokttx.html