2025-10-02 22:38:50
#Emacs lisp to find all occurrences of the form AB4123 (i.e., my university's module codes) in a document:
(save-excursion
(setq r nil)
(while
(re-search-forward "[A-Z][A-Z]4[0-9][0-9][0-9]" nil t)
(push (match-string-no-properties 0) r))
r)
I can then manipulate r, the result, in the *scratch* buffer (I find 15 distinct modules are …