Variable: ruby-syntax-before-regexp-re

ruby-syntax-before-regexp-re is a variable defined in ruby-mode.el.gz.

Value

"\\(^\\|[[{|=(,~;<>!]\\|[?:] \\|\\(?:^\\|\\s \\)\\(?:&&\\|and\\|elsif\\|if\\|not\\|or\\|un\\(?:less\\|til\\)\\|wh\\(?:en\\|ile\\)\\|||\\)\\)\\s *"

Documentation

Regexp to match text that disambiguates a regular expression.

A slash character after any of these should begin a regexp.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/ruby-mode.el.gz
(eval-and-compile
  (defconst ruby-percent-literal-beg-re
    "\\(%\\)[qQrswWxIi]?\\([[:punct:]]\\)"
    "Regexp to match the beginning of percent literal.")

  (defvar ruby-syntax-before-regexp-re
    (concat
     ;; Special tokens that can't be followed by a division operator.
     "\\(^\\|[[{|=(,~;<>!]"
     ;; Distinguish ternary operator tokens.
     ;; FIXME: They don't really have to be separated with spaces.
     "\\|[?:] "
     ;; Control flow keywords and operators following bol or whitespace.
     "\\|\\(?:^\\|\\s \\)"
     (regexp-opt '("if" "elsif" "unless" "while" "until" "when" "and"
                   "or" "not" "&&" "||"))
     "\\)\\s *")
    "Regexp to match text that disambiguates a regular expression.
A slash character after any of these should begin a regexp."))