# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"(.*\n.*)\n(.*)\s{2,}(\d{5})\s{2,}\b(.*)"
test_str = ("\n"
"IUT Lyon 1 - Site de Bourg-en-Bresse\n"
"Rue Henri de Boissieu 01000 BOURG-EN-BRESSE\n\n"
"Tél. : 04 74 45 52 65 Fax : 04 74 45 52 01\n"
"Portable :\n"
"Contact : Claude Noel (chef de département de Génie Biologique de l’IUT Lyon 1)\n"
"E-mail : iutbourg.bio@univ-lyon1.fr\n"
"Site web : iut.univ-lyon1.fr\n"
"Historique\n"
"Création : septembre 2008\n"
"Pas d'historique de production pour cette brasserie\n\n"
"104 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020\n\n"
"du Bugey\n"
"Lacoux 01110 HAUTEVILLE-LOMPNES\n\n"
"Tél. : Fax : \n"
"Portable : 06 67 36 43 36\n"
"Contact : Ludwig de Belvalet\n"
"E-mail : ludwig.debelvalet@gmail.com\n"
"Site web : la-biere-du-plateau.webnode.fr\n"
"www.facebook.com/brasseriedubugey\n"
"Historique\n"
"Création : mars 2017\n"
"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 \n"
"Jacquerie (Conzieu, FR) entre décembre 2014 et mars 2017\n"
"Historique de production (1) prévision (2) estimation\n"
"2017 : 60 hl\n"
"2018 : 72 hl\n"
"2019 : 80 hl (1)\n\n"
"L'Etincelle\n"
"131, rue Les Cornes à Collet - Les Granges 01130 LE POIZAT-LALLEYRIAT\n\n"
"Tél. : 04 74 77 01 07 Fax : \n"
"Portable : 06 38 35 94 02\n"
"Contact : Erwan Bernard\n"
"E-mail : erwan.bernard@brasserie-letincelle.fr\n"
"Site web : www.brasserie-letincelle.fr\n"
"www.facebook.com/Brasserieletincelle\n"
"Historique\n"
"Création : juin 2018\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 50 hl\n"
"2019 : 150 hl (1)\n\n"
"Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr) 105Edition 2020 La bière en France\n\n"
"3B\n"
"Brasserie Bassin Bellegardien\n"
"2t, route du Chêne 01200 BILLIAT\n\n"
"Tél. : Fax : \n"
"Portable : 06 82 84 60 11\n"
"Contact : Johan Primaut\n"
"E-mail : 3b.brasserie@gmail.com\n"
"Site web : www.facebook.com/brasserie3b\n"
"Historique\n"
"Création : novembre 2017\n"
"Pas d'historique de production pour cette brasserie\n\n"
"Bière Yourself\n"
"11, rue de Versoix 01210 FERNEY-VOLTAIRE\n\n"
"Tél. : Fax : \n"
"Portable : 07 61 99 84 15\n"
"Contact : Maxime Collet (gérant)\n"
"E-mail : info@biereyourself.fr\n"
"mfmcollet@gmail.com\n"
"Site web : www.biereyourself.fr\n"
"www.facebook.com/BiereYourself\n"
"Historique\n"
"Création : octobre 2018\n"
"Principalement ateliers de brassage de bières mais également production en petite quantité de bières artisanales (brassins de 20l)\n"
"Historique de production (1) prévision (2) estimation\n"
"2019 : 20 hl (1)\n\n"
"106 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020\n\n"
"Gessienne\n"
"SARL STAJAM\n"
"308, rue de Perruet - ZA de la Maladière 01210 ORNEX\n\n"
"Tél. : 04 50 40 59 89 Fax : \n"
"Portable : 06 84 67 55 13\n"
"Contact : Stéphanie Ponsart\n"
"E-mail : contact@brasseriegessienne.fr\n"
"Site web : www.brasseriegessienne.fr\n"
"www.facebook.com/brasserie.gessienne\n"
"Historique\n"
"Création : juin 2012\n"
"Changement de nom et de statut en avril 2012 : SARL STAJAM\n"
"Ancienne adresse avant mars 2016 : 358 rue de Perruet - ZA de la Maladière 01210 ORNEX\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 430 hl\n"
"2019 : 480 hl (1)\n\n"
"de Grilly\n"
"840, route de Divonne 01220 GRILLY\n\n"
"Tél. : 09 63 51 63 93 Fax : \n"
"Portable : 06 06 45 93 49 (Frédéric)\n"
"Contact : Koos de Korte, Clément Piazza, Frédéric Manson\n"
"E-mail : info@brasserie-artisanale-de-grilly.fr\n"
"mansfred@hotmail.com\n"
"Site web : www.brasserie-artisanale-de-grilly.fr\n"
"www.facebook.com/brasserieartisanaledegrilly\n"
"Historique\n"
"Création : novembre 2017\n"
"La brasserie dispose d'un bar L'Echappée Belle situé à la même adresse\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 350 hl (1)\n"
"2019 : 600 hl (1)\n\n"
"Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr) 107Edition 2020 La bière en France\n\n"
"Saint Clair\n"
"893, route de Pont d'Ain 01250 MONTAGNAT\n\n"
"Tél. : Fax : \n"
"Portable : 07 50 60 43 08\n"
"Contact : Jean-Pierre Bertrand (Président)\n"
"E-mail : jean-pierre@brasserie-saint-clair.com\n"
"contact@biere-privee.com\n"
"Site web : www.brasserie-saint-clair.com\n"
"www.facebook.com/BrasserieSaintClair\n"
"biere-privee.com\n"
"www.facebook.com/biereprivee\n"
"Historique\n"
"Création : août 2017\n"
"L'atelier de brassage Bière Privée est situé sur le même site. Création de bières et étiquettes personnalisées, pour les particuliers et\n"
"professionnels (brassins de 20l, 50l, 200l, 2000l)\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 1000 hl\n"
"2019 : 2000 hl (1)\n\n"
"Jean-Yves Martinal\n"
"Ferme-Brasserie de Belmonthé\n"
"Village de Belmont 01260 BELMONT-LUTHÉZIEU\n\n"
"Tél. : 04 79 87 45 54 Fax : \n"
"Portable :\n"
"Contact : Jean-Yves Martinal\n"
"E-mail : martinal@gmail.com\n"
"Site web :\n"
"Historique\n"
"Création : 2003\n"
"Pas d'historique de production pour cette brasserie\n\n"
"108 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020\n\n"
"Two Hats Brewing\n"
"199, route de Savoie 01300 PEYRIEU\n\n"
"Tél. : 09 62 51 59 21 Fax : \n"
"05 47 07 70 40\n"
"Portable :\n"
"Contact : Andy MacLeod, Julia MacLeod\n"
"E-mail : biere@twohatsbrewing.fr\n"
"Site web : www.twohatsbrewing.fr\n"
"www.facebook.com/TwoHatsBrewing\n"
"Historique\n"
"Création : janvier 2018\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 900 hl\n\n"
"La Poulette des Ebaudis\n"
"Lotissement Les Mûres 01310 CURTAFOND\n\n"
"Tél. : Fax : \n"
"Portable : 06 61 30 45 55\n"
"Contact : Stive Fructus\n"
"E-mail : lapoulettedesebaudis@gmail.com\n"
"Site web : www.lapoulettedesebaudis.fr\n"
"www.facebook.com/La-Poulette-des-Ebaudis-806059202757473\n"
"Historique\n"
"Création : Printemps 2014\n"
"Pas d'historique de production pour cette brasserie\n\n"
"Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr) 109Edition 2020 La bière en France\n\n"
"du Revermont\n"
"Les Deux Frères\n"
"745, allée des Artisans - ZA du Chatelard 01310 SAINT-RÉMY\n\n"
"Tél. : Fax : \n"
"Portable : 06 23 03 34 75\n"
"Contact : Neli Vizeu\n"
"E-mail : ilen@sfr.fr\n"
"nelly.vizeu@sfr.fr\n"
"infos@brasserielesdeuxfreres.com\n"
"Site web : www.brasserielesdeuxfreres.com\n"
"www.facebook.com/Brasserie-du-Revermont-Les-deux-frères-666157120075310\n"
"Historique\n"
"Création : février 2013\n"
"Ancienne adresse avant avril 2017 : 27, route de Journans 01250 BOHAS-MEYRIAT-RIGNAT\n"
"Pas d'historique de production pour cette brasserie\n\n"
"Les Bières Hoffmann\n"
"Les Brasseurs du Grand Colombier\n"
"1263, rue du Point Noir 01350 CULOZ\n\n"
"Tél. : Fax : \n"
"Portable : 06 25 19 72 79 (Paul)\n"
"06 13 82 79 91 (Cédric)\n"
"Contact : Pierre Hoffmann, Paul Rodriguez\n"
"E-mail : hoffmann@lesbiereshoffmann.com\n"
"paul@brasseurscolombier.fr\n"
"cedric@brasseurscolombier.fr\n"
"Site web : www.lesbiereshoffmann.com\n"
"www.facebook.com/lesbiereshoffmann\n"
"Historique\n"
"Création : juin 2015\n"
"Les Bières Hoffmann ont créé l'enseigne Les Brasseurs du Grand Colombier à la même adresse\n"
" http://brasseurscolombier.fr\n"
" https://www.facebook.com/LesBrasseursGdColombier\n"
"Historique de production (1) prévision (2) estimation\n"
"2016 : 30 hl\n"
"2017 : 60 hl\n"
"2018 : 70 hl (1)\n\n"
"110 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020\n\n"
"de la Pérouze\n"
"Ferme de la Pérouze 01380 BÂGÉ-DOMMARTIN\n\n"
"Tél. : Fax : \n"
"Portable :\n"
"Contact : Jérémy Halm\n"
"E-mail : brasseriedelaperouze@gmail.com\n"
"Site web : www.facebook.com/Brasserie-de-la-P%C3%A9rouze-212321282873442\n"
"Historique\n"
"Création : janvier 2018\n"
"Pas d'historique de production pour cette brasserie\n\n"
"La Voie Maltée\n"
"17, chemin de Gromelet 01390 SAINT-JEAN-DE-THURIGNEUX\n\n"
"Tél. : 04 74 00 16 27 Fax : \n"
"Portable : 06 08 96 26 29\n"
"Contact : Denis Julliard (brasseur) et Aurélien Clerc\n"
"E-mail : contact@lavoiemaltee.fr\n"
"Site web : www.lavoiemaltee.fr\n"
"www.facebook.com/Brasserie-La-Voie-Malt%C3%A9e-1694057804184202\n"
"Historique\n"
"Création : janvier 2010\n"
"Les premiers brassins en 2010 ont été réalisés dans les locaux de la brasserie La Franche\n"
"Ancienne adresse avant janvier 2012 : Le Village 01390 RANCÉ\n"
"En 2016, départ à la retraite de Yves Boutaric et arrivée d'Aurélien Clerc\n"
"Historique de production (1) prévision (2) estimation\n"
"2014 : 500 hl\n"
"2017 : 900 hl\n"
"2018 : 900 hl\n"
"2019 : 900 hl (1)\n\n"
"Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr) 111Edition 2020 La bière en France\n\n"
"La Poule\n"
"113, route de Bourg 01400 NEUVILLE-LES-DAMES\n\n"
"Tél. : Fax : \n"
"Portable : 06 52 31 96 36\n"
"Contact : Romuald Saudemon\n"
"E-mail : contact@bierelapoule.fr\n"
"Site web : bierelapoule.fr\n"
"www.facebook.com/bierelapoule\n"
"Historique\n"
"Création : octobre 2018\n"
"Historique de production (1) prévision (2) estimation\n"
"2019 : 200 hl (1)\n\n"
"Mac Never's and Co.\n"
"29, rue du Clou 01430 MAILLAT\n\n"
"Tél. : Fax : \n"
"Portable : 06 68 91 72 66\n"
"Contact : Franck Nevers, Christopher Compagnon\n"
"E-mail : info@macnevers-and-co.beer\n"
"Site web : www.macnevers-and-co.beer\n"
"www.facebook.com/BrasserieMacNeversandCo\n"
"Historique\n"
"Création : juin 2018\n"
"Pas d'historique de production pour cette brasserie\n\n"
"Grange Noire\n"
"10, route de Chamagnat - Le Mortaray 01450 SAINT-ALBAN\n\n"
"Tél. : 04 37 61 04 05 Fax : \n"
"Portable : 06 09 80 50 94\n"
"Contact : Emeline Nottin et Nicolas Blisson (brasseurs et co-gérants)\n"
"E-mail : contact@grangenoire.com\n"
"Site web : grangenoire.com\n"
"www.facebook.com/GrangeNoire\n"
"Historique\n"
"Création : septembre 2019\n"
"Historique de production (1) prévision (2) estimation\n"
"2019 : 100 hl\n\n"
"112 Emmanuel Gillard | Projet Amertume (http://projet.amertume.free.fr)La bière en France Edition 2020\n\n"
"Les Bières du Crépuscule\n"
"21, rue Ferrachat 01560 SAINT-JULIEN-SUR-REYSSOUZE\n\n"
"Tél. : Fax : \n"
"Portable : 06 15 33 04 44\n"
"Contact : Vincent Guyot\n"
"E-mail : bieresducrepuscule@gmail.com\n"
"Site web : www.facebook.com/lesbieresducrepuscule\n"
"Historique\n"
"Création : juillet 2013\n"
"Ancienne adresse avant avril 2016 : rue de l'Oume 05500 SAINT-JULIEN-EN-CHAMPSAUR\n"
"Historique de production (1) prévision (2) estimation\n"
"2018 : 15 hl\n\n"
"ÔBrasseur\n"
"45, rue de Genève 01630 SAINT-...\n"
"10/13/2020 14:15:00 => [Info] PROJET BINEBINE execution ended in: 00:00:12\n")
matches = re.finditer(regex, test_str, re.MULTILINE)
for matchNum, match in enumerate(matches, start=1):
print ("Match {matchNum} was found at {start}-{end}: {match}".format(matchNum = matchNum, start = match.start(), end = match.end(), match = match.group()))
for groupNum in range(0, len(match.groups())):
groupNum = groupNum + 1
print ("Group {groupNum} found at {start}-{end}: {group}".format(groupNum = groupNum, start = match.start(groupNum), end = match.end(groupNum), group = match.group(groupNum)))
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html