Regex in UiPath apps

I want to give a regex pattern to validate Aadhar card number and Pan card number in UiPath apps textbox.

Validation:

Aadhar card : Only 12 digits can be used. For eg: 123456789012
Pan card: 5 Upper case letters, 4 digits and 1 upper case letter For eg: ABCDE1234F

Please provide me the pattern which can validate and throw error if it is in incorrect format.

For Aadhar card - \d{12}
for pan card - [A-Z]{5}[0-9]{4}[A-Z]{1}

try these patterns

Happy Automation!!

Tried this but it is not validating

Did you validated your input, how you are getting.
can you please send your input with dummy data and you can try by using regex101

It is validating on regex 101 website, but when I am entering the regex pattern in UiPath apps regex field then it is not throwing an error if I enter any text or number in that textbox.

@sarvesh.b,

Pass the regex like this

/{[A-Z]{5}[0-9]{4}[A-Z]{1}}/

image

1 Like

@sarvesh.b

Can you go throw below thread once

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