-
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.infoAttachments:
You must be logged in to access attached files.
Author