Here is the case: I want to find the elements which match the regex...
targetText = \"SomeT1extSomeT2extSomeT3extSomeT4extSomeT5extSomeT6ext\"
I was actually dealing with this issue. I prefer Lambda functions for about everything.
reg = /e(.*?)e/gm; var result = reg.exec(targetText); result.forEach(element => console.log(element));