Following are various examples of Boundary Matchers using regular expression in java.
Sr.No | Construct & Matches |
---|---|
1 | ^The 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. |
Leave a Reply