Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save cmiles74/144794 to your computer and use it in GitHub Desktop.

Select an option

Save cmiles74/144794 to your computer and use it in GitHub Desktop.
(progn
(let ((urls ()))
(save-excursion
(goto-char (point-min))
(while
(re-search-forward
"\\<\\(http\\)://[a-zA-Z0-9\-\.\?\&\#]*" nil t)
(let ((start (match-beginning 0))
(end (match-end 0)))
(setq urls (cons
(buffer-substring-no-properties start end) urls)))))
(reverse urls)))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment