Thrasos Website

Sometimes I write about tech and code, and sometimes I don't.

Menu
  • Home
  • About
Menu

Cleaning up VCARD contacts without a phone.

Posted on January 29, 2023January 29, 2023 by thrasos

Export VCARDS on your computer, open notepad++

Ctrl+F and regex:

(?s)BEGIN:VCARD(?:(?!END:VCARD|\bTEL\b).)*END:VCARD

Save and upload them to your contacts on your phone.

Regex breakdown:

(?s)          # Allow the dot to match newlines.
BEGIN:VCARD   # Match "BEGIN:VCARD".
(?:           # Start non-capturing group.
 (?!          # Make sure we're not able to match either
  END:VCARD   # the text "END:VCARD" (we don't want to match beyond the end)
 |            # or
  \bTEL\b     # "TEL" (because we don't want them to be in the match).
 )            # End of lookahead.
 .            # Match any character (if the preceding condition is fulfilled),
)*            # repeat as needed.
END:VCARD     # Match "END:VCARD"

source

Category: blog

Post navigation

← Docker Compose Notes #2
  • GitHub
  • LinkedIn
  • Twitter
  • Telegram
  • Cleaning up VCARD contacts without a phone.January 29, 2023
  • Docker Compose Notes #2December 15, 2022
  • Docker Notes #1December 14, 2022
  • A.I generated poem in GreekDecember 11, 2022
  • A.I. Generated ArtDecember 10, 2022
  • A.I. generated art.December 9, 2022
  • MailCow, simple html in maindomainSeptember 10, 2022
  • CamouflageFebruary 1, 2022
  • Kerkhoffs principleNovember 16, 2020
  • ASCII ARTAugust 13, 2020
© 2023 Thrasos Website