Elisp: Regex Functions
Search Text Functions for Buffer
re-search-forwardre-search-backward
〔see Elisp: Search Text Functions〕
Replace Match
replace-match
〔see Elisp: Find Replace Text in Buffer〕
Get Captured Group
match-datamatch-stringmatch-beginningmatch-end
Regex Function for Matching in a String
string-matchreplace-regexp-in-string
〔see Elisp: String Functions〕
regexp-quote
regexp-quote-
quote regex so it becomes plain text for regex functions.
(regexp-quote ".png") ;; "\\.png" (regexp-quote "[template]") ;; "\\[template]" (regexp-quote "(* comment. applescript ocaml pascal wolframlang *)") ;; "(\\* comment\\. applescript ocaml pascal wolframlang \\*)"
emacs and elisp regex
- Emacs: Regular Expression
- Emacs: List Matching Lines
- Emacs: Regular Expression Syntax
- Emacs: Regex Backslash in Command Prompt
- Emacs: Case Sensitivity in Text Search Commands
- Emacs: Insert Tab or Newline
- Emacs: Wildcards vs Regular Expression
- Elisp: Regular Expression
- Elisp: Regex Functions
- Elisp: Regex Backslash in Lisp Code
- Elisp: Case Sensitivity (case-fold-search)
- Elisp: Find Replace Text in Buffer
- Elisp: Match Data (Regex Result)
- Elisp: Unicode Escape Sequence
- Elisp: Convert Regex to Lisp Regex String
- Elisp: How to Test Regex
- Elisp: Regular Expression in Lisp Syntax, Rx (Package)
- Elisp: Regex Named Character Class and Syntax Table
- Emacs Regex vs Regex in Python, JavaScript, Java