New answers tagged


You can test a regular expression on a document with M-x re-builder and build it interactively. Faulty parts are highlighted.


If you want to check it interactively: (defcustom foo "" "foo" :type 'regexp :group 'emacs) Try giving it an invalid regexp and setting it, and it will raise an error. Or if you want to test it programmatically, this predicate returns t for valid and nil for invalid, and when invalid it shows a message with the error type. (defun regexp-...

Top 50 recent answers are included