Extracting timestamp into variable in jmeter using regex

时间:2016-04-04 16:35:47

标签: regex jmeter

I'm trying to extract a timestamp like hh:mm:ss into a jmeter variable using this regex:

(\d+):(\d+):(\d+)

But this is only getting me the first hh part.

1 个答案:

答案 0 :(得分:1)

You have defined 3 capturing groups with 3 paired unescaped parentheses.

I guess you are using a default $1$, so, use just

(\d+:\d+:\d+)

Or, use $0$ variable with a mere \d+:\d+:\d+.