regexp.glisp 281 B

123456789
  1. (let*
  2. [re (regexp-compile "hello")
  3. loc (regexp-find-index re "012345hello!")]
  4. (assert (= (aget loc 0) 6))
  5. (assert (= (aget loc 1) 11))
  6. (assert (= "hello" (regexp-find re "ahellob")))
  7. (assert (regexp-match re "hello"))
  8. (assert (not (regexp-match re "hell"))))