disclaimer - brand new to regular expressions....
I'm facing a challenge with a string that looks like this:
subject=something||x-access-token=something
The task at hand is to extract two specific values: Subject
and x-access-token
.
To get started, I decided to capture the strings: subject=
and x-access-token=
. Here's what I tried:
/[a-z,-]+=/g.exec(mystring)
However, it only returns subject=
. I was expecting both. What am I doing wrong?