- This topic has 6 replies, 2 voices, and was last updated 7 years, 10 months ago by
jacoline.
-
9th August 2015 at 9:48 pm #5131
Removing CHAN and REFN
Some of (alot) my records have several CHAN and REFN in the record. Since the text and date are not the same I can not use “batch”. It would be nice to remove it total ๐ (And I want to remove them not hide)
I do not know if this is sanity control.
Regards, Jamie Jaconelli
admin and owner of a user customized version of kiwitrees (contain 3 family trees)
-
9th August 2015 at 10:04 pm #5133
No, it is not something sanity checker will do. It will never “fix” anything. Please read the Sanity Check FAQ page.
You CAN easily remove those and any other tags with Batch Update. It does not matter if they have content. You simply need to use the “regular expression” option and search for lines starting with 1 REFN and include all to the end of the line. Or you can include all lines from 1 REFN to the next line beginning with “1 “. Almost anything can be changed or removed in this way.
Batch Update will always be the best tool for these changes, because with that one tool you can do many different things. The alternative would be many different tools each with a single purpose. A lot of code for little use; and still the one tool you want today would be missed!
Nigel
My personal kiwitrees site is www.our-families.info -
10th August 2015 at 5:11 pm #5143
So if I want to remove this:
1 CHAN
2 DATE (several dates)
3 TIME (several times)
2 _WT_USER (several users)How can I do this?
Regards, Jamie Jaconelli
admin and owner of a user customized version of kiwitrees (contain 3 family trees)
-
10th August 2015 at 5:59 pm #5145
1 CHAN([\s\S]*)2 _WT(.*)
This says, in English:
Find “1 CHAN” followed by any number of characters, spaces or line-breaks (([\s\S]*)) until you reach “2 _WT” followed by any number of characters excluding line-breaks (.*).By leaving the Replacement text box empty it will be replaced by nothing, or in fact removed.
This assumes you want to remove ALL such blocks of GEDCOM data. If you want to be more accurate you can adjust it by, for example, including the user names (just “2 _WT_USER_jacoline” instead of “(.*)” at the end
Some sites that can help:
http://www.regexr.com/ – very useful for testing expressions
http://www.regular-expressions.info/ – excellent details about all regular expressions
http://php.net/manual/en/regexp.introduction.php – the official PHP regular expression documentation.Attached is this expression in actual use.
Nigel
My personal kiwitrees site is www.our-families.info -
10th August 2015 at 6:15 pm #5147
THANK you Nigel! ๐ As allways you have a solution (almost)
This is a bit more complexed than a normal user knows. Perhabs a few ex. in the help text? We do not have any at all ๐
Regards, Jamie Jaconelli
admin and owner of a user customized version of kiwitrees (contain 3 family trees)
-
10th August 2015 at 6:21 pm #5148
This is a bit more complexed than a normal user knows. Perhaps a few ex. in the help text? We do not have any at all
Actually yes you do ๐
The subject is too large for a few random examples to be of any help. There are millions of possible examples, and still you one YOU want will be missing, so instead the Batch Update page includes a link to the official PHP regular expression documentation (the third link in my earlier post).
Nigel
My personal kiwitrees site is www.our-families.info -
10th August 2015 at 6:42 pm #5149
I know it is complexed – thats why I suggest something!
Why having this nice batch and users do not know how to use?
I can make a suggestion for a help file and then you can edit for correct english. We just need some suggestions for the use!
Regards, Jamie Jaconelli
admin and owner of a user customized version of kiwitrees (contain 3 family trees)
- The topic ‘Removing tags with content’ is closed to new replies.