On Mon, Nov 01, 2021 at 10:17:28PM +0900, Jean-Christophe Helary wrote: > > > > On Nov 1, 2021, at 21:43, Stefan Monnier via Users list for the GNU Emacs text editor wrote: [...] > >> :regexp "\\([<>=-]+\\)" Oh, yes: always double your backslashes (well /nearly/ [1] always). The first ones are for Lisp's string syntax. [...] > In a different world, I'd try [<>=-]{2,3} Emacs is your world, then. Well, nearly :) It groks {} repetitions (cf. the docs). Note that they are spelt with a backslash (don't forget to double it in string context). This would give: "...[<>=-]\\{2,3\\}..." in your case (the dots are ellipses, for the rest of your regexp). Cheers [1] When you are writing the regexp in a Lisp string. Not when you are entering it interactively, e.g. in the minibuffer. - t