Skip to main content

Questions tagged [regular-expressions]

is for patterns specifying search or replace strings. Also known as `regex` or `regexp`, the patterns describe strings to match when searching or replacing. Emacs provides extensive support for `regex` patterns in many commands. Emacs also provides an interactive expression builder for such patterns.

1 vote
1 answer
77 views

In a very long text, I'd like to search for strings with the following properties: Starts with (let's say) #. Ends with (let's say) @. Does not contain # or @. Does not contain the substring (let's ...
pglpm's user avatar
  • 399
1 vote
1 answer
72 views

I would like to append .*? in isearch-forward-regexp search string when I press TAB key. I have tried ;; Insert .*? on space inside isearch regexp (define-key isearch-mode-map (kbd "<tab>&...
Rittwik Chatterjee's user avatar
1 vote
0 answers
31 views

I have a file that is automatically generated, and another one based on a version of the former with lots of systematic additions. Those additions are always the same text for the whole line, so it ...
JMB's user avatar
  • 11
0 votes
1 answer
40 views

In Appendix A.3 of org manual, Adding Hyperlink Types, there is this function org-man-get-page-name that extracts the page name from buffer name. Like the buffer name is "Man printf*", it ...
Saravana's user avatar
  • 2,139
0 votes
1 answer
70 views

How can I check if a certain character is into set of regular expression without searching in buffer? For example: this regular expression "[a-zA-Z0-9-+=*/_~!@$%^&:<>{}?\t\n\r]" ...
Mitu Gabriel's user avatar
0 votes
1 answer
67 views

I'm using helm-swoop to search within the current buffer using regular expressions. My goal is to find lines containing a whitespace character followed immediately by the digit 4. Consider a buffer ...
Jason Hunter's user avatar
  • 1,234
1 vote
1 answer
142 views

I can't find TAB characters with the regular expression \t. When I press C-M-s followed by \t, Emacs only finds characters t. I'm working with version 28.2 on macOS Monterey.
Marcello's user avatar
1 vote
1 answer
78 views

The elisp manual info node 35.3.1.3 Backslash Constructs in Regular Expressions says that ‘\<’ matches the empty string, but only at the beginning of a word.... ‘\>’ matches the empty ...
Mike Shulman's user avatar
2 votes
0 answers
90 views

What I want A convenient way (with preview, interactivity) to replace regex multi-line matches across many files What I already have I know how to do this for single-line matches. I use counsel-rg, ...
Herman Nurlygayanov's user avatar
2 votes
1 answer
151 views

I'd like my fixed-string searches to be always case insensitive, my regexp searches to be always case sensitive, and I don't want search-upper-case to change the case of my search strings. This should ...
Arch Stanton's user avatar
  • 1,856
1 vote
1 answer
62 views

I'm trying to make word highlighting in emacs. Let's take the example: "fix the radio. radio fixed." I want to highlight the word "fix", but not the first three letters of the word ...
alexandre's user avatar
0 votes
1 answer
62 views

I am writing a function that needs to move the character back to the first ")" character. However, in the middle there might be a "()" characters, I do NOT want the cursor to go ...
Peter Petigru's user avatar
0 votes
2 answers
109 views

I want to preface this question by stating that I read: How to display and format leading spaces (spaces at the beginning of a line) with whitespace-mode? However, it's not solving my problem. I want ...
Peter Petigru's user avatar
0 votes
1 answer
126 views

Replace the first or second Character xxx-xxx-xxx => xxx-xxx*xxx or xxx-xxx-xxx => xxx*xxx-xxx
Bergfried's user avatar
0 votes
1 answer
177 views

I have 1 top module and 1 submodule and i want to autoinst using auto template and regex, my modules are:- module submodule ( input [31:0] in_data, input in_valid, ...
Avik Sarkar's user avatar

15 30 50 per page
1
2 3 4 5
35