New answers tagged regular-expressions
0
You can test a regular expression on a document with M-x re-builder and build it interactively. Faulty parts are highlighted.
3
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
Related Tags
regular-expressions × 394replace × 51
search × 39
font-lock × 22
query-replace × 20
string × 18
org-mode × 16
dired × 10
rx × 10
elisp × 9
isearch × 8
auctex × 7
syntax-highlighting × 7
align × 7
whitespace × 6
latex × 5
major-mode × 5
highlighting × 5
unicode × 5
buffers × 4
evil × 4
faces × 4
functions × 4
text-editing × 4
syntax-table × 4