#!/usr/bin/clisp ; ; Copyright 2009+ Evgeniy Polyakov ; All rights reserved. ; ; This program is free software; you can redistribute it and/or modify ; it under the terms of the GNU General Public License as published by ; the Free Software Foundation; either version 2 of the License, or ; (at your option) any later version. ; (load "regexp.lisp") (defparameter *regexp* "[a|b]aa") (defparameter *string* "baa") (let ((str *string*) (reg *regexp*)) (when (>= (length *args*) 2) (setf str (second *args*)) (setf reg (first *args*))) (dolist (r (regexp-search reg str)) (format t "res: ~A~%" (subseq str (first r) (second r)))))