Search Forums
Forums
Kiwitrees on Twitter
    Tags

    upgrade, GEDCOM errors, locked out, login, colors, ASSO, formatting, CREM, message contactform, clippings cart, set link, permissions, gettext, events of close relatives, descendant, batch update, getClientIp, 500, individual resource, Advanced search, users, census, googlemap. modified, translate, inactive, configure, admin, 3.0.0 widgets, simpl_research, ID notes, album, bug reporting, session, prefix, source, logs, editor, tools, access level, simpl_pages, shared notes, chart, request, 7.1, php 5.6, access roles, married, clipboard, block, fixing errors, watermark, partner, 2.0.2, CHR, administration pages, github, spam, birth, cookie, custom

    Topic:   Removing tags with content  

    This topic contains 6 replies, has 2 voices, and was last updated by  jacoline 2 years, 4 months ago.

    Viewing 7 posts - 1 through 7 (of 7 total)
    • Author
      Posts
    • #5131

      jacoline
      Participant

      479 posts

      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:
      www.jaconelli.dk/webtrees, www.jaconelli.dk/history, www.familien-johnsen.dk(submenu) and danish support at www.host-siden.dk/sandbox and facebook

      #5133
      kiwi
      kiwi
      Keymaster

      1595 posts

      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
      #5143

      jacoline
      Participant

      479 posts

      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:
      www.jaconelli.dk/webtrees, www.jaconelli.dk/history, www.familien-johnsen.dk(submenu) and danish support at www.host-siden.dk/sandbox and facebook

      #5145
      kiwi
      kiwi
      Keymaster

      1595 posts

      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
      Attachments:
      #5147

      jacoline
      Participant

      479 posts

      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:
      www.jaconelli.dk/webtrees, www.jaconelli.dk/history, www.familien-johnsen.dk(submenu) and danish support at www.host-siden.dk/sandbox and facebook

      #5148
      kiwi
      kiwi
      Keymaster

      1595 posts

      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
      #5149

      jacoline
      Participant

      479 posts

      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:
      www.jaconelli.dk/webtrees, www.jaconelli.dk/history, www.familien-johnsen.dk(submenu) and danish support at www.host-siden.dk/sandbox and facebook

    Viewing 7 posts - 1 through 7 (of 7 total)

    You must be logged in to reply to this topic.