I have a string url as follows:
var url = '/test/mybin/processes/edit.jsp?id={processId}';
I want to extract the string "processId"
from above url. I can get it using indexOf
and substring methods, but is there a better alternative to do it? Can we do it using Regex?