Any regex for alphanumeric extraction in matches activity of uipath? for e.g. to extract this?

S102951594
510106266165
1018741952
215198362

@anjasing Does the text begins with a Alphabet and then there are 9 numbers?

Yes, text begins with Alphabet but after that no fixed numbers? but it would be definitely bigger than 4

Is the first alphabet always uppercase?

image

[A-Z]\d{4,}

grafik
first group capital letter
second group numbers

grafik

Hi @anjasing ,

Kindly try (\w+)

Regards,
Dimple.

could you please see the Question again n reply for same??

could you please see the Question again n reply for the same??

Hi, number doesn’t always start with alphabet, few numbers can be alphanumeric few just numbers

[A-Z]?\d{4,}

Have a look here:

with the introduced SOP we have a good pattern for regex questions:

so please tell us:
input, output, and the patterns/rules for the extraction. Thanks

1 Like

Yes you can use (\w+), if u need output in separate line as mentioned please try (\w+)\n(\w+)\n(\w+)\n(\w+)

Regards,
Dimple.

This is the mail body from which I am trying to retrieve the order numbers:
Sometime mail body could be like this:

Hi Team,

Can you please cancel this order

S102951594

Regards
ABCD

And sometimes like this?
Hi Team,

Can you please cancel this order
510106266165

Regards
ABCD

Hope now I’ve clarified

give a try on
[A-Z]?\d+
grafik

2 Likes

Thank you so much :slight_smile:

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