Function: make-url-handler-regex

Source

(defun make-url-handler-regex (url-spec-string)
  ;; The very first underscore `_' separates type and arg. All
  ;; subsequent underscores are considered part of the url arg.
  ;;
  ;; actually, the end shouldn't be $, because I want to allow query parameters.
  (create-url-scanner (strcat "^" (regex-replace-all "([^/:_]+_)?:[^/]+" url-spec-string "\\1([^/]+)") "$")))
Source Context