Created
March 27, 2019 08:46
-
-
Save anderseknert/50ae4e8131c341b64dd00a6ad7f8dd03 to your computer and use it in GitHub Desktop.
Extract all e-mail addresses from a list of Outlook recepients (formatted as "FirstName LastName <[email protected]>; ...")
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env guile | |
!# | |
(use-modules (ice-9 textual-ports) | |
(ice-9 regex)) | |
(let* ((input (get-string-all (current-input-port))) | |
(matches (list-matches "[^<]*<([^>]+)>+" input)) | |
(extractor (lambda (match) (match:substring match 1)))) | |
(display (map extractor matches))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment