Javaregex 简明教程

Examples of Boundary Matchers

以下是使用 Java 中的正则表达式编写边界匹配器的一些示例。

Following are various examples of Boundary Matchers using regular expression in java.

Sr.No

Construct & Matches

1

[role="bare"]../javaregex/javaregex_boundary_matcher_begin.htmlThe beginning of a line.

2

$The end of a line.

3

\bA word boundary.

4

\BA non-word boundary.

5

\AThe beginning of the input.

6

\GThe end of the previous match.

7

\ZThe end of the input but for the final terminator, if any.

8

\zThe end of the input.