unjs / magic-regexp

A compiled-away, type-safe, readable RegExp alternative

Home Page:https://regexp.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Does the look behind operator work with safari?

antlionguard opened this issue · comments

I saw this example on the documentation.

import { createRegExp, exactly } from 'magic-regexp'

const regExp = createRegExp(exactly('foo/test.js').after('bar/'))
console.log(regExp)

// /(?<=bar\/)foo\/test\.js/

This example can work with safari?

This was a documentated. My bad.

No, Safari does not yet support lookbehind. Probably would be useful to add to JSDoc so it gets surfaced when in use...