Hello!
Does anyone know how to fix this regex, and why it’s not capturing the first occurence of ’ char? I want to extract aaname
Pattern: (?<=‘).*(?=’)
I’m using regex101 page to test it.
Test string: webctrl aaname=‘ProductName’ tableRow=‘2’ tag=‘OPTION’
(?<=').*?(?=')
just to make it ungreedy. But we would recommend for other options e.g. attribute retrieval
2 Likes
Have you tried Get Attribute activity. This will give you the aaname more easily.
Thanks,
Ashok ![]()
1 Like
try this regex:

If you need the matches to be without the quotes, just trim them:
myMatch.trim("'"c)
(that is a single quote between double quotes there)
1 Like
in addition to above: using an anchored Regex (also making it ungreedy)

But still we recommend:
1 Like
1 Like
Thank you All, I was looping through collection of options of Select Item element, so that’s why I needed to use Regex. But ungreedy method works.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.

