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

Build a pattern for Properties Mapper

0 votes
Hello,
I have difficulties for build a pattern Regex.. I forgot my lessons  ...

This is an example of my Gedcom files
0 HEAD
1 ......
1 CHAR UTF-8
1 PLAC
2 FORM Town , Area code , County , Region , Country, Subdivision
0 @1I@ INDI
1 NAME Eugénie Joséphine/Lefeuvre/
2 GIVN Eugénie Joséphine
2 SURN Lefeuvre
1 SEX F
.....
1 BIRT
2 DATE 30 JUL 1860
3 TIME 1:0
2 PLAC Bayonne,64100,Pyrénées-Atlantiques,Aquitaine,FRANCE,Pyrénées Atlantiques
2 _FNA NO
2 SOUR @8S@
2 NOTE Témoins :
3 CONT Jean Baptiste
3......
0 @4U@ FAM
1 HUSB @2I@
1 WIFE @1I@
1 CHIL @3I@
1 MARR
2 DATE 6 OCT 1883
3 TIME 11:0
2 PLAC Saint-Maur-des-Fossés,94210,Val-de-Marne,Île-de-France,FRANCE,
2......

Q1 - How to Extract the <Date> from tag <MARR> sub-tag <DATE> ?
Q2 - How to Extract the sub-tag <Town> and the sub-tag <Country> from tag <MARR> sub-tag <PLAC> and build <Town - Country>  <Town> + caracter "-" + <Country> ?
Sometimes <MARR> <PLAC>
    doesn't exist,
    is partially empty i.e. < , Area code , County , Region , Country, Subdivision>
    is partialy empty i.e. <Town ,   , County , Region , Country, Subdivision>
    and so ..
   
Thanks in advance for your help
Regards
in Help by

1 Answer

0 votes

A1

This works very much as described in Place of birth in Family Tree Layout from GEDCOM PLAC data:
(?ms).*^\d\sDATE\s(.*)$

A2

Unfortunately, this is not really supported. Processing "irregular" data requires additional logic that is beyond the scope of yEd's properties mapper and regular expressions in general.
Your best bet is to "sanitize" (i.e. make sure <PLACE> always exists and its data is always "well-formed") your data before processing it in yEd.

by [yWorks] (151k points)
I need your help...

I use the property manager in order to extract some labels for a family layout.

My Gecom file is :
_____________________
1 BIRT
2 DATE 26 FEB 1820
2 PLAC Saint-Gein,40190,Landes,Aquitaine,FRANCE,1 Espe lette
2 _FNA NO
2 SOUR @47S@
1 DEAT
2 DATE 18 JUN 1824
2 PLAC Saint,43190,Andes,Aquine,FRCE,Nou eau
2 _FNA NO
2 SOUR @51S@
_____________________

I want to write a Reg Ex in order to extact the words after "," fiveth commas in the line containing "PLAC". For exemple in the Gedcom lines
firts extract "1 Espe lette
second extract "'Nou eau"
and so on in the Gedcom.

I try this Re EX "(?ms).*^\d\sPLAC\s(?:[^\,]*\,){5}([^,]*).*$"
It does'nt run fine
What is the correct Reg Ex

Thanck a lot from France
What do you mean by "it does not run fine"? What result do you get instead of the expected "1 Espe lette"?
Hello,
Thancks to take some instant for answer

My RegEx extract the words "1 Espe lette" that I look for, but it adds the following line of the file for exemple :
"1 Espe lette
2 _FNA NO"

It does'nt stop at the end of line !!
Waiting for your answer.
Best regards
"(?ms).*^\d\sPLAC\s(?:[^,]*,){5}([^,]*?)$.*$"
Thancks a lot

IT is strange twice "$" but any way its run.

Have a nice day
Legal Disclosure | Privacy Policy
...