How to search a fixed style text in a string

i need your help:
i have a random string in which i need to see and capture if there is a 7 characters random text that has always the same form
xx123xx ----> two letters, 3 numbers, two letters (a plate number for the italian people :))

Please help me,

Hi @Volgin89, how about using some Regex here?
I don’t really understand Regex either, but I think this will work for your case:

Hi @whyyouandi thanks for the fast reply.
So using substring and regex maybe? or activity like find text?

@Volgin89 You can use Regex as shown in the below link

1 Like

Hello @Volgin89, may be you can check Activity named Match Activity.
Or you can search on forum how to use Regex in UiPath.
Sorry haven’t got time to make a sample :frowning:

Create an assign activity:

plateNumber = System.Text.RegularExpressions.Regex.Match(inputText, “\D\D\d\d\d\D\D”).ToString

If there’s no plate number in the text, the variable plateNumber will be empty, so you can continue by testing on whether the variable is empty or not.