Web based family history software

Question help with regex for birth

More
1 month 3 weeks ago #21 by Sir Peter
Replied by Sir Peter on topic help with regex for birth
Some providers no longer upgrade MySQL, but offer MariaDB instead.

Peter

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #22 by Franz Frese
Replied by Franz Frese on topic help with regex for birth
not our provider,
but my solution for the subject is much better.
I can directly click onto the INDI for change within the Lists / Individuals / All, wait a moment, click onto the heading Birth and then I see the wanted ones at start of list..

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #23 by hermann
Replied by hermann on topic help with regex for birth
Good solution Franz!

Our hoster Strato offers MySQL 8 und MariaDB 10.6 but no migration. You have to install a new database. Backup the old one and load it into the new one using ssh (putty). Modify the settings in config.ini.php and delete the old database. I have to do it now.

Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.20 (all custom modules installed, PHP 8.2, MariaDB 10.6) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #24 by janth
Replied by janth on topic help with regex for birth
This triggered me into the following. Is it possible to make a regex where there is no christening AND no birth ? I older danish records you often get only the christening and not the birth, so the query gives considerable noise from individuals with christening but no birth

Webtrees 2.1.18, Ubuntu 22.04.4 LTS, PHP 8.3.3-1, Apache/2.4.52
Last edit: 1 month 3 weeks ago by janth.

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #25 by Franz Frese
Replied by Franz Frese on topic help with regex for birth

Good solution Franz!

Our hoster Strato offers MySQL 8 und MariaDB 10.6 but no migration. You have to install a new database. Backup the old one and load it into the new one using ssh (putty). Modify the settings in config.ini.php and delete the old database. I have to do it now.
Ach, sieht man erst, wenn man eine neue DB anlegen will. Was ist besser?
Oh, you only see it when you want to create a new DB. What is better?

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #26 by hermann
Replied by hermann on topic help with regex for birth
Strato recommends Maria DB. 

Hermann
Designer of the custom module "Extended Family"

webtrees 2.1.20 (all custom modules installed, PHP 8.2, MariaDB 10.6) @ ahnen.hartenthaler.eu

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #27 by Franz Frese
Replied by Franz Frese on topic help with regex for birth
I switched to MariaDB, used a simple sql export and import , manually edited the lines for db open to access the new db.
Result:
 

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #28 by fisharebest
Replied by fisharebest on topic help with regex for birth

This triggered me into the following. Is it possible to make a regex where there is no christening AND no birth ? I older danish records you often get only the christening and not the birth, so the query gives considerable noise from individuals with christening but no birth
 
Yes - this is possible.  See www.rudylee.com/blog/2017/07/28/regular-...ord-but-not-another/

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #29 by janth
Replied by janth on topic help with regex for birth
Thanks for the link, but it seems to me with my limited knowledge of regex that it would match on the same line ?. What I would like to do is find all individuals who have neither BIRT nor CHR attributes but they are on different lines in the gedcom code ?

Webtrees 2.1.18, Ubuntu 22.04.4 LTS, PHP 8.3.3-1, Apache/2.4.52

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #30 by fisharebest
Replied by fisharebest on topic help with regex for birth
"." matches any character EXCEPT newline

So use "(.|\n)", as in the previous example.

Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #31 by janth
Replied by janth on topic help with regex for birth
I tried various methods but I can't figure it out :-) But thanks for your help.

Webtrees 2.1.18, Ubuntu 22.04.4 LTS, PHP 8.3.3-1, Apache/2.4.52

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago #32 by janth
Replied by janth on topic help with regex for birth
I have now studied regexp syntax etc. to try to find a solution to find individuals who have NEITHER "1 BIRT" NOR "1 CHR" records. I have experimented with Ubuntu command line utility "pcregrep" on some exported individuals gedcom files, but so far to now avail. It is my understanding that webtrees use the PCRE variety of regexp syntax ? What I found was that there is a multiline "-M" option for this utility and I wonder if that is what is used by webtrees, or is it single-line ?. Also is the regexp query done in PHP or MySql as there may be differences in the regexp syntax I presume ? I am using MySQL Ver 8.0.36-0ubuntu0.22.04.1 and running webtrees 2.1.18 with PHP Version 8.3.3-1 on ubuntu 22.04.4

Hope some masterful regexp guru can help me out :-)

Webtrees 2.1.18, Ubuntu 22.04.4 LTS, PHP 8.3.3-1, Apache/2.4.52

Please Log in or Create an account to join the conversation.

More
1 month 3 weeks ago - 1 month 3 weeks ago #33 by janth
Replied by janth on topic help with regex for birth
In my quest to understand regexp use in webtrees I have looked into MySQL use of regexp. I don't know if this is the way webtrees does regexp matching. I guess it could be done in PHP outside of MySQL. But assuming the search/replace regexp query use MySQL regexp matching, then I think I may have stumbled on an important difference in regexp matching in versions prior to version 8.0.4 vs. later versions. It turns out that prior to 8.0.4 MySQL used "Henry Spencer's implementation of regular expressions" whereas later version use "International Components for Unicode" (ICU) implementation. They have an important difference regarding matching newlines in the middle of the text to be matched. Spencers implementation will match newlines in the middle of the text whereas ICU will not. To do that with ICU implementation you have to specify the "m" (multiline) match_type when doing a MySQL regexp call. I wonder what webtrees 2.1.18 does in this regard ? I suspect it is not using the "m" option, which seems to explain my failure to match two different attributes in same file.
I wonder if that is the case maybe there cold be added an option for the different MySQL match_types to the query form ? And maybe have a search-only form without the replace function ?

Webtrees 2.1.18, Ubuntu 22.04.4 LTS, PHP 8.3.3-1, Apache/2.4.52
Last edit: 1 month 3 weeks ago by janth.

Please Log in or Create an account to join the conversation.

Powered by Kunena Forum
}