Reputation: 251
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
Reputation: 14030
This is better:
patients-list-of-visits\.aspx\?p=(.+)
2 remarks
.*?
is a lazy match and will result in in only the first letter being matched. Your second attempt is betterUpvotes: 2