Splitting a String Is Not Working

Hi,

I’m trying to split a long string in several pieces. Here is the entire string:
IDENTIFICAÇÃO PESSOAL ☐ ID: 085547781 Nome: Oliveira Diogo www.desafiosrpa.com.br Nasc.: 01/10/1979.

I extract it from a png file by using the activity UiPath Document OCR . I have to store the numbers after ID:, the name after Nome: and the date after Nasc.:

The ID and the date I can get correctly as you can see in the output panel, but the name I can’t. I don’t want the website address.
To get it I’m using this: img_STR.Split("Nome:")(1).Split(" Nasc.:")(0)

Is there a way that I could use a RegEx in this case? I’ve never used it before.

A generic but also specific regex could look like this:

with referring to the groups:
grafik

where afterwards also can be postprocessed (e.g. trimming the space, dot)
myString.Trim({" "c,"."c})

For regex also have a look here:

@ppr

Thank you, it’s working now!

Cheers!

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