How to use "Matches regexp"?

faq

#1

Hi,

I want to check an extension of a file and only process ‘doc’, ‘docx’, and ‘pdf’ files. I am using regex in IF statement but it does not work. Seems like it is full match.

EX: test.doc
If item matches regexp (doc|pdf)
If item matches regexp ([^\s]+(.(?i)(doc|pdf))$)

Please kindly advise.

Thanks,
Hanh


#2

.*(doc|pdf) should work.
Please let me know if that helps.


#4

It works. Thank you so much.

Regards,
Hanh


#5

Hi
I want to check if a variable contains an email adress. Meaning I want to check for a pattern like “aaaa@bbbb.ccc” Can I do that with the regexp condiiton check? What is the syntax for that?
Thanks!


#6

Hi,Can You check this syntax for this…
[a-zA-Z][a-zA-Z0-9-.]*@[a-zA-Z0-9]+([.][a-zA-Z]+)+
Thanks
Sharad Kumar


#8

Hi,
In rpa recorder , while condition somewhere else i used matches…with the help of matches i think we can do…Can you try for that?
Thanks
Sharad Kumar


#9

Hi @sharad_kumar
I tried it and it works pretty good. Although it does not detect as wrong emails the following cases:
name@doma.incom
name@domainco.m

It correctly rejects cases like
namedomain.com
name@domaincom
But for my needs I can use it perfectly. Thanks!!


#10

Hi tim,
You can define the range after dot…Then i think u r above problem will resolve…
Thanks
Sharad Kumar