Positive lookahead assertions


show more Positive lookahead assertions provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Using Regular Expressions show less
please wait ...

Positive lookahead assertions

In this chapter, we will be talking about lookaround assertions. Lookaround assertions are made up of two main types: lookahead assertions, and lookbehind assertions, and those are further divided into positive, and negative. In this movie, we'll start by examining positive lookahead assertions. The metacharacters that we are going to use to define a positive lookahead assertion are the question mark, followed by the equals sign, and you will use these inside a grouped expression as the first characters inside the parentheses. A lookahead assertion is an assertion of what ought to lie ahead.

We're telling the regular expression engine, essentially, take this grouped expression, and look ahead, and see if you can find a match. If our lookahead expression fails, well then the whole match will fail. But if not, then the engine will keep going, and see if it can make a match out of everything else in the expression, and we can use any valid regular expression inside the lookahead a...

Positive lookahead assertions
Video duration: 6m 39s 5h 36m Intermediate

Viewers:

Positive lookahead assertions provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Using Regular Expressions

Subject:
Developer
Software:
Regular Expressions
Author:
please wait ...