question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support for ES2018 Regular Expressions

See original GitHub issue

I’m getting a Warning for a Regular Expression but it actually works.

Javascript code:

function getIframesSources(html) {
	return html.match(/(?<=<iframe.* src\s*=\s*").*?(?=")/gmi);
}

Warning thrown by Closure Compiler v20180716: WARNING - Malformed Regular Expression: Malformed parenthetical: (?<=<iframe.* src\s*=\s*").*?(?=")

Working RegEx test: https://regex101.com/r/4YyzKP/1

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
brad4dcommented, Dec 12, 2019

We’ve done all we plan to do for supporting the RegExp features added in ES_2018. closure-compiler will recognize them and not choke on them. However, if your output language is earlier than ES_2018, then the compiler will issue a suppressible error to tell you that it cannot transpile the new RegExp features to make them work where they are not natively supported.

1reaction
brad4dcommented, Jul 24, 2018

@MatthewMerrill will be working on this in the next few weeks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"regular expression" | Can I use... Support tables for ... - CanIUse
"Can I use" provides up-to-date browser support tables for support of front-end web technologies on desktop and mobile web browsers.
Read more >
RegExp named capture groups • Exploring ES2018 and ES2019
This chapter explains proposal “RegExp Named Capture Groups” by Gorkem Yakin, ... Destructuring can help with getting data out of the match object:....
Read more >
How can I allow use es2018 regex in JavaScript/TypeScript in ...
I assume that your project has a tsconfig.json file with compiler's option. Use the lib option and specify ES2018 there.
Read more >
how can allow use es2018 regex in javascript/typescript
Look-behind groups are not supported in this regex dialect. idea 2018.2.3. im use noide.js 10 it allow use this, but idea show error...
Read more >
ES2018: RegExp lookbehind assertions - 2ality
The only lookaround assertion currently supported by JavaScript is the lookahead assertion, which matches what follows the current location.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found