Welcome to yEd Q&A!
Here you can ask questions and receive answers from other members of the community and yEd developers. And you can tell us your most wanted feature requests.

Categories

From the tag "PLAC" in Gedcom, How to extract only the value "Town" or "Area code" for a label

0 votes

Hello

This is a part of my Gedcom files - the section @XX@ INDI
-----------------------------------------
0 @1I@ INDI
1 NAME Eugénie Joséph/Lef/
2 GIVN Eugénie Joséph
2 SURN Lef
1 SEX F
1 BIRT
2 DATE 27 SEP 1856
 2 PLAC Paris,75000,Paris,Île-de-France,FRANCE,5 eme arrondissement
2 _FNA YES
....
....

0 @2I@ INDI
....
...
-----------------------------------------
As you will see in this example the tag "BIRT" "PLAC" has in the order "Town", the "Area code", "County" and so .. with separator "comas"

 1 BIRT
2 PLAC Town , Area code , County , Region , Country, Subdivision

I can't extract the field "BIRT "Town" or "Area code" with the parameter ""(?ms).*\d\s\PLAC\s(.*)$"
This parameters extract the whole line "Town , Area code , County , Region , Country, Subdivision", but not only "Area code" in the label
I try others code .. but I can't reached success... Maybe I am wrong when I type the Pattern ?
I read <https://yed.yworks.com/support/qa/10304> I Read - <https://yed.yworks.com/support/qa/14276> I Read - <https://yed.yworks.com/support/qa/12169>

 Question 1 – From the tag PLAC in gedcom, How to extract only the value "Town" or "Area code" for a label in a node of the family tree ?

 Best regards

in Help by (270 points)
recategorized by

1 Answer

0 votes

The regular expression (?ms).*^\d\sPLAC\s(.*)$ means "for a line that starts with a number, a whitespace, the text "PLAC", and an additional whitespace, extract the rest of the line".
What you want is "for a line that starts with a number, a whitespace, the text "PLAC", and an additional whitespace, extract the text after the i-th and before the next comma.".

E.g. try
(?ms).*^\d\sPLAC\s([^,]*),.*$
to extract town,
(?ms).*^\d\sPLAC\s[^,]*,([^,]*),.*$
to extract area code, etc.

This is really not a yEd problem, but rather a regular expression problem. Please see the Java 8 Pattern documentation for information on the supported regular expression syntax.

by [yWorks] (161k points)
Hello,
You are right this is not concerning Yed but Regex,
Thank for your help

Sorry for the disturb
Best regards
Problem PROPERTIES MAPPER or Reg ex or Gedcom ?

0 HEAD
1 SOUR HEREDIS 14 PC
2 VERS 14
2 NAME HEREDIS PC
2 CORP BSD Concept ©
3 ADDR www.heredis.com
1 DATE 16 APR 2020
2 TIME 12:00:27
1 GEDC
2 VERS 5.5
2 FORM LINEAGE-LINKED
1 CHAR UTF-8
1 PLAC
2 FORM Town , Area code , County , Region , Country, Subdivision
1 SUBM @S0@
0 @S0@ SUBM
1 NAME Jean Claude
1 ADDR 7 chemin errepira Guethary
0 @1I@ INDI
1 NAME Rosa/BASTI/
2 GIVN Rosa
2 SURN BASTI
1 SEX F
1 FAMS @5U@
1 _FIL RELATIONSHIP_UNKNOW
0 @2I@ INDI
1 NAME Jeantoire/PROT/
2 GIVN Jeantoire
2 SURN PROT
1 SEX F
1 BIRT
2 DATE 30 JUL 1797
2 PLAC Bayonne,64100,Pyrénées-Atlantiques,Aquitaine,FRANCE,
2 _FNA NO
2 SOUR @13S@
1 FAMS @4U@
1 _FIL LEGITIMATE_CHILD
0 @3I@ INDI
1 NAME Hynthe/SUHXXXXXE XXIT SXXRTIN/
2 GIVN Hynthe
2 SURN SUHXXXXXE XXIT SXXRTIN
2 NSFX dit Saint-Martin
1 SEX M
1 OBJE
2 FORM jpg
2 FILE C:\Documents and Settings\JClaude\Mes documents\BSD Concept\Heredis\Mes généalogies\YED5-Media\Suhebiette-St-Martin-Hyacinthe.jpg
2 NOTE Portrait Hyacinthe Suhebiette dit Saint Martin
2 DATE
1 BIRT
2 DATE AUG 1789
2 PLAC Saint-Marc,,,,SAINT-DOMINGUE,Saint Domingue
2 _FNA YES
2 SOUR @17S@
1 DEAT
2 DATE EST 1867
2 _FNA YES
2 SOUR @19S@
1 OCCU couXXXXssade
1 FAMS @4U@
1 FAMS @5U@
1 SIGN YES
1 _FIL LEGITIMATE_CHILD
0 @4U@ FAM
1 HUSB @3I@
1 WIFE @2I@
1 MARR
2 DATE 19 JUL 1820
3 TIME 8:0
2 PLAC Bayonne,64100,Pyrénées-Atlantiques,Aquitaine,FRANCE,
2 _FNA NO
2 OBJE
3 FORM jpg
3 FILE C:\Documents and Settings\JClaude\Mes documents\BSD Concept\Heredis\Mes généalogies\YED5-Media\Suhebiette-St-Martin-Hyacinthe-Laisser-Passer.jpg
3 NOTE Un de ses laisser passer diplomatique
3 DATE
2 SOUR @15S@
1 _UST MARRIED
0 @5U@ FAM
1 HUSB @3I@
1 WIFE @1I@
1 MARR
2 DATE 29 JAN 1854
2 PLAC Paris,75000,Paris,Île-de-France,FRANCE,10 eme arrondissement
2 _FNA YES
2 SOUR @21S@
2 SOUR @11S@
2 SOUR @7S@
2 SOUR @9S@
1 _UST MARRIED
0 @7S@ SOUR
1 TITL Faire part des deux mariages 1820 et 1853
1 ABBR 0008-Suhebiette-Saint-Martin-Mariage-1-et-2.pdf
1 TYPE Deed
1 REPO
2 CALN
3 MEDI Other
1 QUAY 0
0 @9S@ SOUR
1 TITL Faire part de mariage du 17 janvier 1853
1 ABBR 0007-1853_01_22_L_Assembl_e_nationale_Retronews-1.pdf
1 TYPE Deed
1 REPO Archives Journal de l'assemblée Nationale
2 CALN
3 MEDI Other
1 QUAY 0
0 @11S@ SOUR
1 ABBR 0014-Suhebiette-Hyacinthe-Bastide-Rosalie-1853-Mariage.pdf
1 TYPE Deed
1 REPO AD 75 - Archives numérisées de Paris 03 arr - Mention acte de mariage 1895
2 CALN V3E_M_00946_00159
3 MEDI Other
1 QUAY 0
1 _ARCH Vue 9
1 TEXT http://archives.paris.fr/arkotheque/visionneuse/visionneuse.php?arko=YTo2OntzOjQ6ImRhdGUiO3M6MTA6IjIwMjAtMDEtMjgiO3M6MTA6InR5cGVfZm9uZHMiO3M6MTE6ImFya29fc2VyaWVsIjtzOjQ6InJlZjEiO2k6NTtzOjQ6InJlZjIiO2k6NTgzMzY7czoxNjoidmlzaW9ubmV1c2VfaHRtbCI7Y
2 CONC joxO3M6MjE6InZpc2lvbm5ldXNlX2h0bWxfbW9kZSI7czo0OiJwcm9kIjt9#uielem_move=145%2C-99&uielem_islocked=0&uielem_zoom=48&uielem_brightness=0&uielem_contrast=0&uielem_isinverted=0&uielem_rotate=F
0 @13S@ SOUR
1 TITL Acte non numéroté du 30 juillet 1797
1 ABBR 0003-Prevot-Jeanne-Victoire-1797-Naissance.pdf
1 TYPE Deed
1 REPO AD64 - Service départemental des archives-Bayonne -  Naissance 1793-an IX
2 CALN 5Mi102/33
3 MEDI Other
1 QUAY 0
1 _ARCH Vue f677/701
1 TEXT http://earchives.le64.fr/archives-en-ligne/ark:/81221/r17795z311g74k/f677?context=ead::FRAD064003_IR0002_G28
0 @15S@ SOUR
1 TITL Acte 39 et 739 récapitulatif
1 ABBR 0004-Suhebiette-Saint-Martin-Hyacinthe-Prevot-Jeanne-1820-Mariage.pdf
1 TYPE Deed
1 REPO AD 64 - Service départemental des archives-Bayonne -  Mariages 1807-1823
2 CALN
3 MEDI Other
1 QUAY 0
1 _ARCH Vue f724/925 et 857/925
1 TEXT http://earchives.le64.fr/archives-en-ligne/ark:/81221/r17806zw874hkk/f724?context=ead::FRAD064003_IR0002_G298
0 @17S@ SOUR
1 ABBR 0013-Suhebiette-Saint-Martin-Hyacinthe-1820-Acte-notoriete.pdf
1 TYPE Deed
1 REPO AD 64 - Service départemental des archives
2 CALN Série U
3 MEDI Other
1 QUAY 0
0 @19S@ SOUR
1 RESN privacy
1 ABBR 0006-Suhebiette-Saint-Martin-Hyacinthe-Fin traitement de Légion d'honneur.pdf
1 TYPE Family Bible
1 REPO Fiche de traitement inclue dans sa sacoche de courrier
2 CALN
3 MEDI Other
1 QUAY 0
1 TEXT Fin de perception 1 semestre 1867 inclu.
2 CONT Il est donc décédé en 1867 1 ier ou 2 ème semestre ?
0 @21S@ SOUR
1 TITL Faire part de mariage 17 janvier 1853
1 ABBR 0009-Saint-Martin-Hyacinthe-Mariage-2-Jl-des-débats-politiques.pdf
1 TYPE Deed
1 REPO Archives - Journal des-débats-politiques
2 CALN
3 MEDI Other
1 QUAY 0
0 TRLR

Hello
In this Gedcom I try to extract for a the label <9> <MARR-DATE> with <(?ms).*^\d\sDATE\s(.*?)$.*>

The second marriage date is extract <29 JAN 1854> is extract, the first marriage <19 JUL 1820> is not extract !!
Something is wrong in the Mapper or in the Regex or in the Gedcom.

Note the extraction for example of the <MARR> <PLAC> run well for each of the marriage
Thanks in advance

Best Regards
Legal Disclosure | Privacy Policy
...