bkone
bkone

Reputation: 251

Jmeter - Regex Extractor not working

I'm trying to extract a simple string from the HTML response. The response looks like this

patients-list-of-visits.aspx?p=a1363839-76fb-43f3-97ba-26218faefee1

The Regex I have tried so far are

patients-list-of-visits.aspx?p=(.+?)
patients-list-of-visits.aspx?p=(.+)

Can someone please let me know what am I doing wrong here?

Thanks!

Upvotes: 0

Views: 708

Answers (1)

buckley
buckley

Reputation: 14030

This is better:

patients-list-of-visits\.aspx\?p=(.+)

2 remarks

  • don't forget to escape . and ? if you want to match them literally
  • your first attempt .*? is a lazy match and will result in in only the first letter being matched. Your second attempt is better

Upvotes: 2

Related Questions