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

ECMA 2018 regex support #24531

Closed
Geobert opened this issue May 31, 2018 · 7 comments
Closed

ECMA 2018 regex support #24531

Geobert opened this issue May 31, 2018 · 7 comments
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints

Comments

@Geobert
Copy link

Geobert commented May 31, 2018

Search Terms

ECMA 2018
lookbehind
regex

Suggestion

Support ECMA 2018 javascript regex

Use Cases

In order to have lookbehind ((?<=) and (?<!)) support

Checklist

My suggestion meets these guidelines:

  • [x ] This wouldn't be a breaking change in existing TypeScript / JavaScript code
  • [x ] This wouldn't change the runtime behavior of existing JavaScript code
  • [x ] This could be implemented without emitting different JS based on the types of the expressions
  • [ x] This isn't a runtime feature (e.g. new expression-level syntax)
@mhegazy
Copy link
Contributor

mhegazy commented May 31, 2018

Not sure what is the details of the request here. TypeScript does not do any processing or checking on regular expressions, and they are all deferred to the host. so var x = /(?<=\1(.))/; is already valid TS regular expression.
The compiler does not do any down leveling either for these features, that includes Unicode, and named capture groups.

See #21290 for related discussion

@mhegazy mhegazy added the Out of Scope This idea sits outside of the TypeScript language design constraints label May 31, 2018
@Geobert
Copy link
Author

Geobert commented Jun 1, 2018

I've asked for this on VSCode repo and they told me to ask here. So you're saying that extensions in vscode can use lookbehind already?

@mhegazy
Copy link
Contributor

mhegazy commented Jun 1, 2018

so you want ti use lookbehind in VSCode regexp search box? or in your own .js code?

@Geobert
Copy link
Author

Geobert commented Jun 1, 2018

I tried to use lookbehind with https://github.com/DomiR/vscode-regreplace and it didn't work

@mhegazy
Copy link
Contributor

mhegazy commented Jun 1, 2018

I think this is an issue that should go back to VSCode then. TypeScript drives the language service for JS and TS, which is not what we are talking about here.

@octref
Copy link

octref commented Jun 1, 2018

We use ripgrep and seems no: BurntSushi/ripgrep#188

@typescript-bot
Copy link
Collaborator

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Out of Scope This idea sits outside of the TypeScript language design constraints
Projects
None yet
Development

No branches or pull requests

4 participants