Forum Academy Marketplace Showcase Pricing Features

Regex produces errors only on safari

I have the following Regex, trying to capture everything that is after the # in the url: (?<=#).*

Behavior was different on safari and the “When Page is loaded” workflow this is in runs in safari, it doesn’t even get to Step 1 and just skipped the whole workflow. Eventually, I noticed these errors in the debug console: “Bad Regex format: Invalid regular expression: invalid group specifier name”

This shows up only on safari. Any idea why, or how to fix it?

Edit: I see a bunch of other posts pointing to sites like https://regex101.com/. The problem is that a bunch of things/operators/rules that work there, just don’t work in bubble. Except I’m unclear why, or if bubble is a specific type of regex, which is it and what are the rules?

It’s happened because Safari does not support full RegExp functionality ECMAScript 2016+ compatibility table.

Especially RegExp Lookbehind Assertions.

So just try to change your expression to (?:#).*