Get Value Capture Regex in the url

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
mariya.syera
Posts: 9
Joined: Wed Nov 08, 2017 10:59 pm

Get Value Capture Regex in the url

Post by mariya.syera » Wed Feb 28, 2018 8:46 pm

I am trying to get a partial value of a url, and not sure how to use a Capture Regex for urls.

For Example:

URL: https://qapatientally.com/user/pw-reset/2/email/ZXlKaGJHY2lPaUpJVXpJMU5pSXNJbVY0Y0NJNk1UVXhPVGcwTkRNMk55d2lhV0Yw

I need to get a value everything after https://qapatientally.com/user/pw-reset/2/email
for later use in the script.

How would I do that?
Mariya Syera
Office Ally, Inc

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 3945
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Get Value Capture Regex in the url

Post by odklizec » Thu Mar 01, 2018 12:37 pm

Hi,

So if I understand you right, you need to get the string right after "email/"? I would suggest to use GetValue action and this regex pattern: (?<=email\/)(?s)(.*$)
Basically, it should return string found right after email\ part of web address. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

mariya.syera
Posts: 9
Joined: Wed Nov 08, 2017 10:59 pm

Re: Get Value Capture Regex in the url

Post by mariya.syera » Thu Mar 01, 2018 5:13 pm

Yes, I will try that.

Thank you!
Mariya Syera
Office Ally, Inc