mdebonne
(Mdebonne)
1
hello,
i’m using join pdf activity to… join pdf file in one ^^
my file look like “MR JAMBON BEURRE 123456.pdf”
Then, i assign a variable to my directories (which content joigned files)
I want to use Regex , to extract only the number on the file name. (just before extension)
I use the expression = (\d+)(?!.*\d)
But this not working, and i don’t how to do now …
Could you help me ?
Thanks a lot !
1 Like
Charbel1
(Charbel)
3
Hello, welcome to the community!
Try out this expression:
(\d*)(=?.pdf)
Best,
Charbel
Yoichi
(Yoichi)
4
Hi,
Can you try the following expression?
System.Text.RegularExpressions.Regex.Match(yourString,"\d+(?=\.[^.]+$)").Value
Regards,
mdebonne
(Mdebonne)
5
Thank for your reply !
This expression (\d*)(=?.pdf) ,
and this expression System.Text.RegularExpressions.Regex.Match(Item.toString,“\d+(?=.[^.]+$)”).Value
return me this in the log =>
System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]
Yoichi
(Yoichi)
6
Hi,
Can you try to use just Assign activity?
left side : string variable
right side:
System.Text.RegularExpressions.Regex.Match(yourString,"\d+(?=\.[^.]+$)").Value
Regards,
1 Like
mdebonne
(Mdebonne)
7
Yes that’s ok it’s work
Thanks you Yoichi !
1 Like
how do you remember long syntax? every time