The following javascript expression yields ["myParameter=foobar", "foobar"]
.
'XXXXmyParameter=foobar'.match(/(?:myParameter=)([A-Za-z]+)/);
Why is "myParameter=foobar"
even a match? I thought that positive lookbehinds are excluded from matches?
Is there a way to only capture the ([A-Za-z]+)
portion of my regex in javascript? I could just take the second item in the list, but is there a way to explicitly exclude myParameter=
from matches in the regex?