Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax for RegExp literals #6287

Open
cknitt opened this issue Jun 4, 2023 · 1 comment · May be fixed by #6776
Open

Syntax for RegExp literals #6287

cknitt opened this issue Jun 4, 2023 · 1 comment · May be fixed by #6776
Milestone

Comments

@cknitt
Copy link
Member

cknitt commented Jun 4, 2023

JS has the following syntax for RegExp literals:

const myRegExp = /ab+c/;

In ReScript, this would currently be expressed as

let myRegExp = %re("/ab+c/")

It would be nice if ReScript also had dedicated syntax for regexp literals, if possible identical to the JS version:

let myRegExp = /ab+c/
@cristianoc cristianoc added this to the v12 milestone Jun 11, 2023
@texastoland
Copy link

texastoland commented Jul 7, 2023

May I add regex support for extended x flag (currently Stage 3) with flexible whitespace and comments 🙏🏼
https://github.com/tc39/proposal-regexp-modifiers
https://github.com/tc39/proposal-regexp-x-mode

@glennsl glennsl linked a pull request May 26, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants