Does the title not just sum it up? I'm attempting to gather groups and merge them together.
Here's the text in question:
GPX 10.802.123/3843 1 - IDENTIFIER 48
And this is what I desire as output:
IDENTIFIER 10.802.123/3843-48
So, just to be clear, I aim to capture a group before and after a specific word, then concatenate the two using only regex. Feasible?
I've managed to extract 48
in the following manner:
var text = GPX 10.802.123/3843 1 - IDENTIFIER 48
var reg = new RegExp('IDENTIFIER' + '.*?(\\d\\S*)', 'i');
var match = reg.exec(text);
Output:
48
Can it really be done?
My offer stands at 200 points.