Hello,
the RegExpConstructor
now returns a System.Text.RegularExpressions.Regex
instead of a JSRegex
this is a problem because sometimes you want to use the native regex instead of the one from .Net.
I personally think we should not truncate part of the JavaScript API. So the user can choose which API is preferred in his case.
For example, when writing a binding some JavaScript libraries expect a JSRegex.
Would you agree to re-introduce the native JavaScript API? :)
Fable translates F# regex as JS regex, so you should be able to send them to any JS API. In fact, I only left the RegExpConstructor
because when using System.Text.RegularExpressions.Regex
the global flag is always set to emulate .NET behavior, when sometimes you don't want it for performance (or need the sticky flag).
Ok 😄
Seems like my Safari browser is stuck on an old version of the repl and I don't know how to unblock it...
After testing in Firefox, it seems like we indeed have a a native JS regex as a result.
Yeah, Safari doesn't seem to invalidate the service worker, which looks like a bug. You can try Alt + Cmd + R.