Unpredictable regexp results when saving regex to a variable and calling 'exec()'
Reported by
matthew....@gmail.com,
May 12 2018
|
||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.139 Safari/537.36 Steps to reproduce the problem: 1. In any console, enter: let property = 'salary_rules[nil36378820000][description]' 2. Then enter: let idRegex = /^salary_rules\[(.*?)\]\[(title|description)\]/g; 3. Now enter the following repeatedly: idRegex.exec(property) What is the expected behavior? A match is returned each time. What went wrong? A match is returned every other time, even though neither the regex nor the string is changing. Did this work before? N/A Chrome version: 66.0.3359.139 Channel: n/a OS Version: OS X 10.12.6 Flash Version:
,
May 14 2018
,
May 15 2018
Thanks for filing the issue! Able to reproduce the issue on reported chrome version 66.0.3359.139 and on the latest canary 68.0.3430.0 using Mac 10.13.1, Ubuntu 14.04 and Windows 10. As the issue is seen from M60(60.0.3112.0) considering it as Non-Regression and marking it as Untriaged.
,
May 16 2018
Closing as per comment #1. |
||||
►
Sign in to add a comment |
||||
Comment 1 by woxxom@gmail.com
, May 12 2018