Sankar
Sankar

Reputation: 111

Regex to generate only numbers

I need a regular expression to generate numbers for the variable 'session.ID=2211090' and I am going to use this regex in Jmeter's post Processor-Regular Expression Extractor.

Thanks in advance for your help.

Upvotes: 0

Views: 771

Answers (1)

crimson_penguin
crimson_penguin

Reputation: 2778

If you mean a regular expression to extract those numbers, then this should do it: session.ID=(\d+)

If you're replacing, replace with just $1 or \1, depending the language. Or if you're just wanting to use the numbers, then use the first capture, however you do that in the language you're using.

Upvotes: 2

Related Questions