This one I just learnt reading a PR in the melpa repo.
Usually we use ^ and $ to match the beginning and end of the line when dealing with regular expressions.
But, the same way we have \A and \z in ruby , in elisp manual: elisp regex backslash explains there is \` and \' (that would be written \\` and \\' inside your regex string) to anchor the regex match to the beginning and end of the string or buffer. While $ matches end of the line, so "hello$" will match "hello\ngoodbye", while "hello\\'" will not.
Suscribirse a:
Enviar comentarios (Atom)
No hay comentarios:
Publicar un comentario