Regex useful tricks with Lookahead and Lookbehind

Lookahead and Lookbehind in regex : Lookahead and lookbehind, collectively called “lookaround” is a very useful concept at times which would be otherwise next to impossible to solve by any other means. Found a great article explaining the cases where we can use this: Regex – Lookahead and Lookbehind Zero-Length Assertions

Few useful bits to understand the concept :

Related image

Image result for lookahead and lookbehind in regex

Image result for lookahead and lookbehind in regex

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s