Joe Maller.com

We had some trouble getting custom groups out of Outlook and into Address Book. Plug this regular expression into BBEdit’s Find/Replace to change Outlook’s tab-delimited text file export into a group VCard (and be sure to save it with a ‘.vcf’ file extension):

Find:
^([^\t]*)\t([^\t]*)\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t
[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t[^\t]*\t([^\t]+).*$

Replace: BEGIN:VCARDVERSION:3.0\rN:\2;\1;;;\rFN:\1 \2\rEMAIL:\3\rEND:VCARD

(mozilla-based browsers couldn’t figure out where to wrap the first part of the pattern and were stretching the page to accomodate the whole thing. Not good. Be sure to remove all line break characters and spaces from the pattern before using it.)

Share |
link: Aug 30, 2002 11:15 pm
posted in: misc.

Comments are closed.