I am trying to use python regex back reference to match all instances for the first group match, but it is stopping at the first match. How can i match all the occurrences? For example:
var req = new XMLHttpRequest()
req.open('POST', 'http://example.com', false);
req.send(null)
My first group match is req, and then if req is found, I am trying to match req.open and req.send, but I am only getting a match on req.open.
The pattern I am using is
([a-zA-Z_$][0-9a-zA-Z_$]*)\s?=\s?new XMLHttpRequest.+?(\1\.((open|send)\(.+?\)))