Extract an URL parameter value
Content: <a href="/page.jsp?kind=1¶m1=value1¶m2=value2">
Regex to extract value1 (only param1 is dynamic):
<a href="/page.jsp\?kind=1¶m1=(.*?)¶m2=value2">Regex to extract value1 (all parameters dynamic):
<a href="/page.jsp\?.*?param1=([^&"]*)Regex to extract value1 (where only the kind=1 links are to be taken into account):
<a href="/page.jsp\?kind=1.*?param1=([^&"]*)Comments:
- The first "?" is escaped with a backslash as it is a special character.
- The first dynamic part, ".*?" , means "any character followed by 'param1='" in this instance. The question mark "?" means that the first occurrence matched must be used.
- ([^&"]*) means "any character except '&' and '"', several times". The brackets are required to define the group. The first group ($1$ in NeoLoad), refers to this matching part.
Home