I have an html response, in which, a particular line is
var session_name = '1342100453_3334440619019170';
from which, I need to extract '1342100453_3334440619019170' and 1342100453_3334440619019170
Would it be possible to extract in using a regex? I need to reply this parameter in jmeter, but that’s a different story.
That will capture
'1342100453_3334440619019170'into the first capturing group. Whatever API you are using should be able to access that value relatively easily.EDIT: I see you are using Java.
I’m not familiar with any of the regex APIs in Java, although
java.util.regex.Patterndoesn’t look too bad.See http://www.regular-expressions.info/java.html