Variable: wisent-python-string-re

wisent-python-string-re is a variable defined in python.el.gz.

Value

"[Uu]?[Rr]?\\(?:'''\\(?:\\\\'\\|[^']\\|'\\{1,2\\}[^']\\)*'''\\|'\\(?:\\\\'\\|[^']\\)*'\\|\"\"\"\\(?:\\\\\"\\|[^\"]\\|\"\\{1,2\\}[^\"]\\)*\"\"\"\\|\"\\(?:\\\\\"\\|[^\"]\\)*\"\\)"

Documentation

Regexp matching a complete Python string.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/wisent/python.el.gz
(defconst wisent-python-string-re
  (rx
   (opt (any "uU")) (opt (any "rR"))
   (or
    ;; Triple-quoted string using apostrophes
    (: "'''" (zero-or-more (or "\\'"
                               (not (any "'"))
                               (: (repeat 1 2 "'") (not (any "'")))))
       "'''")
    ;; String using apostrophes
    (: "'" (zero-or-more (or "\\'"
                             (not (any "'"))))
       "'")
    ;; Triple-quoted string using quotation marks.
    (: "\"\"\"" (zero-or-more (or "\\\""
                                  (not (any "\""))
                                  (: (repeat 1 2 "\"") (not (any "\"")))))
       "\"\"\"")
    ;; String using quotation marks.
    (: "\"" (zero-or-more (or "\\\""
                              (not (any "\""))))
       "\"")))
  "Regexp matching a complete Python string.")