xregexp-lookbehind

Lookbehind helpers for XRegExp

Usage no npm install needed!

<script type="module">
  import xregexpLookbehind from 'https://cdn.skypack.dev/xregexp-lookbehind';
</script>

README

xregexp-lookbehind

A tiny node wrapper around slevithan's lookbehind implementation.

Usage

var merge = require('lodash.merge');
var XRegExp = require('xregexp').XRegExp;

merge(XRegExp, require('xregexp-lookbehind'));

console.log(XRegExp.matchAllLb("Catwoman's cats are fluffy cats", '(?i)(?<!fluffy\\W+)', /cat\w*/i));
// ['Catwoman', 'cats']