I'm trying to develop a regular expression that matches data with this format:
430::1820-07-27::Vitorino Pinheiro Lacerda::Rodrigo Pinheiro Lacerda::Custodia Maria Alvares::::
430::1873-05-12::Vitorino Teixeira Pires::Jose Teixeira::Ana Martins Pires::Doc.danificado.::
425::1724-09-06::Xavier Araujo Costa::Bernardo Araujo::Angela Costa::::
425::1714-07-30::Xavier Araujo Ferreira::Geraldo Araujo::Ana Ferreira::Jose Araujo Ferreira,Irmao. Proc.21011.::
425::1689-11-02::Xisto Magalhaes Cunha::Francisco Fernandes::Maria Francisca::Doc.danificado.::
426::1898-11-18::Zacarias Rodrigues Mano::Manuel Rodrigues Mano::Felicidade Jesus Tarrio::::
426::1900-11-12::Zacarias Silva Mariz::Luis Silva Mariz::Felicidade Correia Santos::::
426::1785-10-20::Zeferino Antonio Pereira Nobre::Antonio Pereira Nobre::Maria Josefa Garcia::::
425::1809-01-27::Zeferino Antonio Vassalo::Simao Vassalo::Maria Jose::::
For now, I managed to obtain most of the specific groups however I am struggling to obtain an expression to obtain a group that captures the content between a "," and the next occurrence of a ".". An example can be the fourth case previously presented where the content that should be captured is "Irmao".
Here's the regular expression I obtained so far:
(?P<folder>\d*)::(?P<date>\d{4}-\d{2}-\d{2})::(?P<name>.+?)::(?P<father>.+?)::(?P<mother>.+?)::(?P<observations>.*((?:,)?(?P<family>[^\.]*)?))(?:::)?
::
and then tried regex for only theobservations
part.