all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* regexps that match and don't match
@ 2018-01-06  2:10 Emanuel Berg
  0 siblings, 0 replies; only message in thread
From: Emanuel Berg @ 2018-01-06  2:10 UTC (permalink / raw)
  To: help-gnu-emacs

Did anyone think of doing something like this?

    (defun re-match-white-black (string re-white re-black)
      (let ((white (string-match re-white string))
            (black (string-match re-black string)) )
        (and white (not black)) ))
    ;; (re-match-white-black "aaab" ".*b" "z.*") ; t
    ;; (re-match-white-black "baab" ".*b" "z.*") ; t
    ;; (re-match-white-black "aaac" ".*b" "z.*") ; nil
    ;; (re-match-white-black "zaab" ".*b" "z.*") ; nil
    ;; (re-match-white-black "zaac" ".*b" "z.*") ; nil

-- 
underground experts united
http://user.it.uu.se/~embe8573


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-01-06  2:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-06  2:10 regexps that match and don't match Emanuel Berg

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.