Regex value output help

Hi Guys,

Just to let you know im using StudioX plus I have enabled " Show Developer ".

Im trying to regex a pdf, pulling various values then writing to excel.
Read pdf text which gives me “Text from Read PDF Text” ( message box attached ).
The output from " Matches " is " Result from Matches ".
When trying to input the result in this message box, the only option is
" Result from is Match " but the output from the matches is " Result from Matches ".

Would appreciate any guidance.
Am I using the correct action ? ismatch is boolean I believe ?
How to write the regex value to a message box, not looking for true / false but the actual regex output value. Finding it very confusing :crazy_face:

My string info@BerkshireHathaway.com
my regex (?<=@).+?(?=.)
Message box BerkshireHathaway

Screenshot 2022-04-15 170442

Screenshot 2022-04-15 170827

Screenshot 2022-04-15 172454

Edit, I restarted Studiox and now the correct option for using the saved value is now showing in the option within the message box :grinning:

But still need guidance on writing the output as the actual value rather than true/false.

Thanks

Hi @MikeC ,

Could you give this a try?

Saved.Item(0).Value

Kind Regards,
Ashwin A.K

1 Like

Where to input that ?

Hi @MikeC ,

The output variable from the Matches Activity.
I have a question, does your pdf contain only one email or multiple emails, and if there happens to be multiple emails, do you want to capture all of them?

Kind Regards,
Ashwin A.K

No buddy, just 1 email address.

The result from matches again isnt showing in the message box options ?

I tried your code but error, if im doing it correctly.
Im coming from Power Automate where the resulting output is automatic so please have patience with me :rofl:

Hi,

If condition
System.Text.RegularExpressions.Regex.IsMatch(“inputString”,“regexPattern”)
add (?sim) in your expression
(?sim)(?<=@).+?(?=.)

1 Like

Hi,

Can you try as the following?

First, put ForEach activity then set System.Text.RegularExpression.Macth at TypeArgument property.
Then put MessageBox (for example) inside the ForEach, and set item.Value using Advanced Editor.

Regards,

1 Like

Hi guys,

Ive actually just changed over to Studio from StudioX just to see if I could get it working.
I am getting the correct output now, works perfectly.
I would prefer StudioX as my biggest fail is getting correct syntax.
I think what was happening in StudioX was having to enable developer from the action tree.
I had to force close StudioX as it stopped responding.
Uipath do state Studio actions are not designed for use in Studiox.
Will switch back to StudioX later today to try again and report back.

Thanks everyone :grinning:

Happy to know that you are starting to figure things out on your own!

Studio is better imo.
It allows you to develop complex automations and offers better flexibility.

Kind Regards,
Ashwin A.K

Agree Studio is better but im hopeless at syntax :rofl:

What im struggling to understand is why when I have 3 saved values but the one I want ( Result from Matches ) fails to show when im looking to reuse it, lets say in a message box etc.

Screenshot 2022-04-16 154603

Screenshot 2022-04-16 154544

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.