Hello to everyone
Looks like string manipulation sometimes can be very hard to handle.
This is my string
1.2. Nome Robert Negula
1.2. Endereço Rua do circuito do estoril N12DT
1.3 Telefone 916778495
1.4. N° ID Civil 302541244151551
1.5. N° ID Fiscal 2520145741444141
It is coming from a PDF file extracted with Tesseract.
The same thing as usual, putting the data into a variable, then assign it to a String array list variable.
It has to be something related to the manipulation because if I use a text box inside the for each loop I can see the data coming.
“I want to get only “Robert Negula” cutting “1.2. Nome” from the string”
Anyone can help?
Thank you a lot!
Hi. Can you emphasize what information you want to extract? And what is your goal?
Which text you want exactly from 1.2. Nome Robert Negula ?
Hello, I miss that part:
I want to get only “Robert Negula” cutting “1.2. Nome” from the string
1.2. Nome Robert Negula
test.xaml (5.4 KB)
Use the regex condition like this: (?<=Nome\s)(\S.+)
Refer the screenshot
Try this and let me know
But the Nome here is dynamic right?? So after 1.2 you would like to ignore the first string ? if yes, what are the other possibilities of getting the values other than Nome and what if 1.2 Nome ABCD Rober Negula, is this possible too?
But I’m only getting two names out of three
Since i want to make it dynamic i need it to collect all the names in that row, any idea in how to achive that?
Hello, i want to leave regex for last option.
But thank you a lot for helping
If you decide to make it with regex
Assign a STRING_VARIABLE = System.Text.RegularExpressions.Regex.Matches(INPUT, “(?<=Nome\s)(\S.+)”)
Note: INPUT is the variable to store the values you mention above.
Thanks and regards
You can use same code, let me know what you don’t want to extract?
Run it without if condition it will work for all as right now it is picking 1 and 2 index value.
I didn’t express my self well.
By example: I’m testing with another name like: Paul Chaves Quintero Hortiz.
With that string manipulation I’m only receiving: Paul Chaves.
How can I get the full name?
But if the name is smaller or bigger the app will crash xD
But the thing is how the bot will know what is the full name of the person?
In last example we have done string manipulation for Nome but you have identified it as Nome Robert is full name so we used 2 index but for bot it’s hard to identified the full names ?
You have to put it in if condition that if the person name is this bot have to pick this much of index value.
this can be handle, let me share it again
test.xaml (7.2 KB)