LISP PROJECTS (20)
most recent version : 1.0 |release date : 10 June, 2004.
  cl-user(2): (require :regexp2)
  ; Fast loading /acl/acl70/src/code/regexp2.fasl
  ;   Fast loading /acl/acl70/src/code/yacc.fasl
  t
  cl-user(3): (match-re "(a)*b" "xaaabd")
  t
  "aaab"
  "a"
  cl-user(4): (match-re "(a)*b" "xaaabd" :start 1)
  t
  "aaab"
  "a"
  cl-user(5): (match-re "(a)*b" "xaaabd" :return :index)
  t
  (1 . 5)
  (3 . 4)
  cl-user(6): (match-re "(a)*b" "xaaabd" :return :index :start 1)
  t
  (1 . 5)
  (3 . 4)
  cl-user(7): (match-re "(a)*b" "xaaabd" :end 4)
  nil
  cl-user(8): (match-re '(:greedy-repetition 0 nil #\b) "bbbc")
  t
  "bbb"
  cl-user(9): (match-re '(:greedy-repetition 4 6 #\b) "bbbc")
  nil
  cl-user(10): (let ((re (compile-re "(([a-c])+)x")))
		 (match-re re "abcxy"))
  t
  "abcx"
  "abc"
  "c"
  cl-user(13): (multiple-value-bind (found whole fname lname date month year)
		   (match-re
		    "(\\w+)\\s+(\\w+)\\s+(\\d{1,2})\\.(\\d{1,2})\\.(\\d{4})"
		    "Frank Zappa 21.12.1940")
		 (list fname lname
		       (encode-universal-time 0 0 0
					      (parse-integer date)
					      (parse-integer month)
					      (parse-integer year))))
  ("Frank" "Zappa" 1292918400)
  cl-user(14): (split-re "\\s+" "foo   bar baz
    frob")
  ("foo" "bar" "baz" "frob")
  cl-user(21): (replace-re "foo Fooo FOOOO bar"
			   "(?i)fo+"
			   "frob")
  "frob frob frob bar"
  cl-user(24):
Mastering Regular Expressions

Order at Amazon