Regex for Filepath, MailId and Password

Hi,
Can anyone help me to get the regex for Filepath, Mailid and Password using matches activity? That too, input will be read from notepad file. I have tried with one workflow by displaying message box for filepath alone, but am getting only the empty message box…

I have given input in the notepad file as:
Path: C:\Users\abc.d01\Documents\Abc.xlsx
Mail Id: abc@gmail.com
Mail pswrd: abc@123

I have attached the workflow which I did,
Sample.xaml (6.5 KB)

Hi @indhu.p01

(?<=Mail I’d:).*

Like that try to use

Thanks
Ashwin.S

For path: “(?<=Path: ).*”
For mailId: “(?<=Mail Id: ).*”
For password: “(?<=Mail pswrd: ).*”

Hi @AshwinS2 @srdjan.suc
I am getting the empty message box again.

Thanks,
Indhu

Take a screenshot of your properties/flow.
Are you using RegexResult(0).Value?

Here I attached the screenshot.

Try FilePath(0).Value

@srdjan.suc
Am getting this error: “object reference not set to the instance of the object”

yes I got output for Path…let me try for mail id and Password .

try putting in Input property Item instead of Vout, maybe that is why it is not getting any value

Hi @indhu.p01
use matches before the for each item and check it

Thanks
Ashwin S

@srdjan.suc @AshwinS2
Thanks both of you.
I have an another doubt that should we need to use separate matches activity for each input(path,mail id and Password)?

Thanks,
Indhu

Thanks both of you @srdjan.suc @AshwinS2

I got how to do with matches activity. I got the exact output.

Thanks,
Indhu

1 Like

Yea, this is a good practice because sometimes the files are big and you need to get exact matches

yes.

Thank You…

Hi,
@srdjan.suc @AshwinS2

And one more thing if I copy the same workflow or copy same activity to someother workflow it is showing something like “Unexpected expression” in message box activity and if I tried to assign the variable in message box like “FilePath(0).Value” it is showing error as “Method name expected”…so what might be the issue on this?

Thanks,
Indhu

1 Like

Sure, so you did not declare the variable FilePath in that flow or scope, that is why you are shown that exception

Even if I have created new variable, it is showing the “Method name expected” error and also while copying sequence to another workflow am getting “Unregistered expression editor” error…still am not getting about this issue…

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