Function: string-match-p

string-match-p is a byte-compiled function defined in subr.el.gz.

Signature

(string-match-p REGEXP STRING &optional START)

Documentation

Same as string-match except this function does not change the match data.

Other relevant functions are documented in the regexp group.

Probably introduced at or before Emacs version 23.1.

Shortdoc

;; regexp
(string-match-p "^[fo]+" "foobar")
    => 0

Aliases

org-string-match-p (obsolete since 9.0)

Source Code

;; Defined in /usr/src/emacs/lisp/subr.el.gz
(defsubst string-match-p (regexp string &optional start)
  "\
Same as `string-match' except this function does not change the match data."
  (let ((inhibit-changing-match-data t))
    (string-match regexp string start)))