See bug 773687, the metacharacter ^ doesn't change its meaning in ES6 even working with the /y flag. The MDC doc should be updated.
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → INVALID
(In reply to ziyunfei from comment #1) > See bug 773687, the metacharacter ^ doesn't change its meaning in ES6 even > working with the /y flag. The MDC doc should be updated. s/MDC/MDN/. Sorry, typo. And in your case, you should use the /m flag along with the /y flag. >var regex = /^(\S+) line\n?/my;
You need to log in before you can comment on or make changes to this bug.