I have a problem. I need to find all the Contract numbers in a csv that results out of a Get Visible Text Activity. I wrote them into a csv file and got this result:
Column1;Von;Erhalten;Nachricht;Column2;Column3;Empfänger;Sonstiges Name;Vorname;<Datum Betreff;;Name;;Vorname ID des Anhangs; Benutzercode;Durchwahl;Uhrzeit Gelesen;;Code;;Durchwahl Kommentar des Anhangs; Meier;Marcel;30.10.2019 A-Konto-Zahlung Vertrag 7732151;;Schnitzel Petra;;978404; Meier;2112;14:36:12 26.11.2019;;Schnitzel;3103;A-Konto-Zahlung Vertrag 7732151; STOPDAGEHT;Eveline;08.08.2019 A-Konto-Zahlung Vertrag 7652254;;Kurz Hartman;;978334; STOPDAGEHT2104;;15:08:50 . .;;Kurz;;3105 A-Konto-Zahlung Vertrag 7652254;
I need to get the 7 Digit-Number after the word: Vertrag There is always a “;” behind it. Please help.
Thanks for your help. But I don’t get it to work properly.
So I’m reading out the text. Then generating a DT and a CSV. Then I use the Matches Activity.
Then I use a Write Line to see what is in the collection. This only works when I use to String. But the Output is trash
" System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match] "
Yah you are almost done
It would be like this str_output = System.Text.RegularExpressions.Regex.Match(test.ToString, (?<=Vertrag\s).[0-9]+).ToString
Where str_output is a variable of type string
As you have mentioned Match activity it will give only one match
If we have used Matches which would give us many such matches then the assign activity would be like this match_Values = System.Text.RegularExpressions.Regex.Matches(test, (?<=Vertrag\s).[0-9]+)
Where match_Values is a variable of type System.Collections.Generic.Ienumerable(System.Text.RegularExpressions.Match)
What that’s a lot of info and help! I will just input my Workflow here. Basically what I want it to do:
Extract the Visible text find the Contract Numbers and Write them all in a CSV File. Each in One Line. Any Ideas?
Maybe the workflow helps. Read_it.xaml (8.5 KB)Hobbit.txt (6.6 KB)