libpcre binding of Emacs Lisp

I'm writing libpcre binding of Emacs Lisp. Most of programmers is not familiar with Emacs Lisp regular expression because regular expression function or library of many languages has compatibility of Perl regular expression. I suppose such people writes regular expression easily with this library.


Sample code

(let ((input "")
      (regexp "
# backslash is not necessary for grouping
(https?): # $1 schema
([^/]+)   # $2 host
(/.*)     # $3 path
  (when (pcre-string-match regexp input '(extended)) ;; extends flag allows space/comment in regular expression
    (message "schema:%s, host:%s, path:%s"
             (match-string 1 input)
             (match-string 2 input)
             (match-string 3 input)))) ;; "schema:https,, path:/foo/bar/baz.txt"


I design this library same as Emacs regular expression interfaces, signature, behavior etc. For example case sensitive or insensitive searching is decided by current case-fold-search value.

Issues or any suggestions

Please report me if you have any suggestions via github issue.