Hello,
Can you help me with that file to build a good regex plz ?
i built a regex for everything except what I have surrounded :
Hello,
Can you help me with that file to build a good regex plz ?
i built a regex for everything except what I have surrounded :
Hello @Soudios To maintain clean learning environment, kindly show us what you have tried so far.
Yes of course, i used that regex:
Contact :
(?<=Contact : ).*
Tél :
(?<=Tél. : )[0-9 ]+
Portable :
(?<=Portable : )[0-9 ]+
Fax :
(?<=Fax : ).*
Email :
(?<=E-mail : ).*
Hello @Soudios here you go…
(Tél[\s\S]*?)Historique
use this pattern and let us know if it works for you or not…
if it is not working then please give sample text.
Test.xaml (6.1 KB)
Hello @Soudios,
Regex for Historique:-
(?=Historique)[A-Za-z\s:0-9()-,]+(?=))
Thanks & Regards,
Raj Parsana
Not working good
This is the sample text
Ain (01)
22 brasseries
IUT Lyon 1 - Site de Bourg-en-Bresse
Rue Henri de Boissieu 01000 BOURG-EN-BRESSE
Tél. : 04 74 45 52 65 Fax : 04 74 45 52 01
Portable :
Contact : Claude Noel (chef de département de Génie Biologique de l’IUT Lyon 1)
E-mail : iutbourg.bio@univ-lyon1.fr
Site web : iut.univ-lyon1.fr
Historique
Création : septembre 2008
Pas d’historique de production pour cette brasserie
104 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020
du Bugey
Lacoux 01110 HAUTEVILLE-LOMPNES
Tél. : Fax :
Portable : 06 67 36 43 36
Contact : Ludwig de Belvalet
E-mail : ludwig.debelvalet@gmail.com
Site web : la-biere-du-plateau.webnode.fr
Brasserie du Bugey | Hauteville-Lompnes
Historique
Création : mars 2017
La gamme de bières était brassée entre juin 2009 et décembre 2014 par La Bière du Plateau (Hauteville-Lompnes, FR), puis par La
Jacquerie (Conzieu, FR) entre décembre 2014 et mars 2017
Historique de production (1) prévision (2) estimation
2017 : 60 hl
2018 : 72 hl
2019 : 80 hl (1)
Hello @Soudios,
Use this (?=Historique)[A-Za-z\n\é\s:0-9 PUT YOUR WORDS HERE ]+(?=))
Thanks & Regards,
Raj Parsana
i can’t put all the words here because there are 1000 pages
It’s some different language so put that letters, I am not able to type using my keyboard.
Hello
Have a look at this solution:
(?<=Facebook\nHistorique)[\s\S]+
It will work as long as the “www.facebook.com” is always constant.
Hi,
Thank you for your response but “www.facebook.com" is not always constant.
We need to find something else
You can find here the output : output.txt (9.9 KB)
Also, the pattern does’nt work for me :
Hello
It won’t work in Regex101.com because its not a perfect match to UiPath’s language. It will work in UiPath
Hmmm I need more information on the pattern.
What more can you tell me about it?
Hello @Steven_McKeering ,
What i need is to extract information from pdf and put it in an excel file
I managed that for now :
and i need now to find a regex to extract : Name / city / adress / Zip Code and Historique
There is some output example from the pdf file : output.txt (9.9 KB)
This is the excel file i want to create : Projet TEST.xlsx (128.9 KB)
Hello
I should be able to help you
Tell me about the pattern of the text - this will save me time
Can you please find provide the the list of Names you want from the output.txt
Is Name just “Contact”?
I am unsure which is the correct city and address field.
Sample:
(308, rue de Perruet - ZA de la Maladière 01210 ORNEX)
01210 is the Zip code you want yes?
Hello @Steven_McKeering
Thank you, you can find below my answer.
For this adress example : 308, rue de Perruet - ZA de la Maladière 01210 ORNEX.
Adress : 308, rue de Perruet - ZA de la Maladière
Zip code : 01210
City : ORNEX
For names, its the names of the company, for example in this picture
Name 1 is : Gessienne SARL STAJAM
Name 2 is : de Grilly
Hi @Soudios
I believe I have a pattern here with no false positives.
Pattern:
(.*\n.*)\n(.*)\s{2,}(\d{5})\s{2,}\b(.*)
Please let me know how it goes.
Hi @Steven_McKeering
Perfect ! it works !
Now do you know how can i separate the information as i showed you before plz ?
Hey
I have a workflow that splits out the following into string variables for you.
Main.xaml (21.7 KB)
I am sure there are ‘cleaner’ ways to make this work but this should work fine
Hopefully this helps