Skip to content

Instantly share code, notes, and snippets.

@YumaInaura
Last active September 13, 2018 23:18
Show Gist options
  • Save YumaInaura/da4c4451ca49faab83860377cc81ef98 to your computer and use it in GitHub Desktop.
Save YumaInaura/da4c4451ca49faab83860377cc81ef98 to your computer and use it in GitHub Desktop.
Learning regex with pictures — Lookahead and Lookbehind

Regex — How to remember lookahead and lookbehind

Here is regex

image

Match advances start to end

image

So head is facing to end

image

Behind is facing to start

image

Match advances past to future

Toward to future is head direction.

Toward to past is behind direction.

image

See carefully Lookbehind syntax includes left arrow toward to Start

image

Reversibly Lookahead syntax does not include right arrow toward to End

But I think naturally time advances Start to End means Past to Future so right arrow is omitted.

image

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment