I need to match an expression and extract values from it using named groups.
Lets say this is my string:
var str = 'element=123'
So i want to match it using regex and extract the element and value.
I know how to do it is c#, I am trying to figure it out in JS.
This is my regex:
new RegExp(/^(<element>[A-Za-z0-9])+=[A-Za-z0-9]+$/);
What am I doing wrong?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…