Regex for assign

Hello I am trying to get the ordernumbers in a text file.

Uw opdracht : IOR192568789

And i’m now using this: System.Text.RegularExpressions.Regex.Match(GetTekst,“(?<=Uw opdracht : )(\w+){12,}”).ToString

But I dont get a output.

Sample of the text file:

Rming- en vaslgoedonderhoud
— —
Twakkaler 49 7589 ST
ENSCHEDE
Telefoon 08509786600
Email info@repaiasdaad.nl
{Km/032933;?“ 175 Website hflpzlAvwwv
‘ V IBAN NL12ABNA14789752491
8943 3” ENSCHEDE Swiflcode ABNANL2A
KvK nr. 092088784133
BTW nr. NL8214V471581903VBO1
FACTUUR Debiteurcnnummcr Uw BTW~nL
399648852 NL80476145681230801
Factuurnummer Plaats & Datum
20191452008147 ENSCHEDE, 5 juni 2008
Omschrijving BTW. Hoev‘ Eenheid Prijs Totaalprijs
Opdracht : 1978502 Uitvoerdaturn : 15-032010
Werkadres : Zonnasebrink 72, WINK Bouwjaar : 1944
Komplexlperceel : 1250799541 [6003924 Opzichter :
Gemeld door :
Klacht : as lekkage in badkamer
Uw Opdracht : IOR190000619
" Hoofdwerkzaamheden" H 1 post € 17895,00 € 14789,00
Totaal Deze Opdracht € 15488,13)

Try your regex on https://regex101.com/ and see if your expression returns the group you’re looking for.

Can you show your code?

Try System.Text.RegularExpressions.Regex.Match(Tekst,“(?<=opdrachtnummer: )(\w+){12,}”).Value.ToString

Nothing

@Nalube Please try below Regex pattern once.

  "(?<=Uw opdracht : )(\w+){12,}"

@Manjuts90 I have already tried that one it works in the RegEx Builder but not in the Assign

@Nalube I am getting correct output with same regex pattern in assign activity also. check below regex statement once.

System.Text.RegularExpressions.Regex.Match("Uw opdracht : IOR192568789","(?<=Uw opdracht : )(\w+){12,}").ToString

I only want the ordernumber behind "Uw opdracht : " the output should be “IOR192568789”.

So it had to read a text file and search it for ordernumber behind “Uw opdracht”

System.Text.RegularExpressions.Regex.Match(GetTekst,“(?<=Uw opdracht : )(\w+){12,}”).ToString

@Nalube I am getting below output with regex i have mentioned.

@Nalube
Hope This will Solve your issue

(?<=Uw opdracht : )(.*){12}

image

@ashley11 still nothing :frowning:

Sequence1.xaml (4.2 KB)
Check this flow. Im getting the output.
if still facing the issue feel free to post

is your issue solved?

I haven’t tried it yet

In the message box I see the ordernumber but not in the output and assign box

you are assigning it wrong it should be
Order number = Matches_Out(0)

Ok.

Did it solve your issue?

if you are not using the (0) after it will give you collection object. so when assigning make sure to put zero after the Matches_Out :slight_smile:

YESS thnx bro @ashley11