I was trying to find specific word from the string But I couldn't able to find the exact match regex. The String can dynamically be changed in two forms
https://www.test.com/vgi-bin/tmpscr?cmd=_temp-out&useraction=commit&token=EC-1J942953KU425764F
https://www.test.com/vgi-bin/tmpscr?cmd=_temp-out&useraction=commit&token=EC-1J942953KU425764F&paymentid=PAY-12345K4776H687987R
I need to find the pattern to get the token value.
I have tried with this regex (?<=token\=).*
I was able to get the token from first string but not in second.
Output should be like below.
EC-1J942953KU425764F