Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.9.1
-
None
Description
In the work to port kate to QmlScript I encountered another RegExp bug in QML. I unfortunately haven't been able to write a reduced test-case yet, but what happened was that lastIndex on a global RegExp started not null, if the same RegExp literal had been matched before, even though the new match was started from a new literal.
I am assuming there is a cache of compiled RegExps somewhere, and we probably are lacking a reset of lastIndex when a new RegExp gets a cached value instead of a new C++ object.
Attachments
Issue Links
- is duplicated by
-
QTBUG-64525 Regex does return null every second time it is executed
- Closed