Learn Java Programming - Regex Boundaries Tutorial

Published: 28 February 2016
on channel: Daniel Ross
1,538
25

Regex boundaries allow you assert things about where a token can exist in a search string. Let's imagine for a moment that we want to make sure that the first three characters of a string are actually digits followed by a dash(-). We would do this using the caret(^) metacharacter which instructs the regex engine to make sure the token to the right is the first thing in the beginning of a line.
"^(\\d){3}-" · "867-5309" will return TRUE when invoking the .find() method.


On this page of the site you can watch the video online Learn Java Programming - Regex Boundaries Tutorial with a duration of hours minute second in good quality, which was uploaded by the user Daniel Ross 28 February 2016, share the link with friends and acquaintances, this video has already been watched 1,538 times on youtube and it was liked by 25 viewers. Enjoy your viewing!