You can use the regex exec() method to only extract 1 (flow property) match at a time, which returns an array where the name is already parsed out. You have to setup a loop to go through each hit, but there's only a single regex. There's only a single pass, so less need to remove whitespace beforehand.