Skip to main content

More Regular Expressions: Using Lookarounds to Parse Data

Hands-On Lab

 

Photo of

Training Architect

Length

01:00:00

Difficulty

Intermediate

While using regular expressions, lookarounds allow us to create zero-width boundaries where the boundaries are also regular expressions. This will enable us to ensure that our primary expression either begins or ends with the provided lookaround or does not begin or end with the provided lookaround. The expression in the lookaround is matched, but not captured, so the resulting match is only the non-lookaround text. This allows us to fine-tune our expressions and ensure we're only matching what we want.

What are Hands-On Labs?

Hands-On Labs are scenario-based learning environments where learners can practice without consequences. Don't compromise a system or waste money on expensive downloads. Practice real-world skills without the real-world risk, no assembly required.