DEV Community

Discussion on: Lookaheads in Javascript

Collapse
 
savagepixie profile image
SavagePixie • Edited

Thanks!

Thanks also for the link. I'll update the post and add it.

By the way, you can also do lookbehinds in Javascript, which work the same way, except that they return a match if the expression is preceeded by the lookbehind.

const regExA = /(?<=)/ //Positive lookbehind
const regExB = /(?<!)/ //Negative lookbehind