Advertisement
  1. Code
  2. Workflow
Code

How to use Lookaheads and Lookbehinds in your Regular Expressions

by
Difficulty:BeginnerLength:ShortLanguages:

Today, we'll be reviewing the intricacies of regular expressions. More specifically, we'll discuss both how and why you should use positive/negative lookahead ands lookbehinds in your regular expressions. Originally meant to be a quick tip, this screencast ended up a bit longer than expected, at around eighteen minutes.

After viewing the video, keep in mind that, for any given task, there are a plethora of ways to match your desired text. For example, when matching a Twitter username – as we did in the video – you could also use a non-word-boundary, rather than a positive lookbehind.

The key is to find the right tool for the job.


Full Screencast


Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.