Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • You example returned eval: Search failed: "\`[^.]+\\.dsp\\'" but I upvoted you anyway for your thorough and quick answer :) Commented Jul 17, 2017 at 16:01
  • @yassinphilip How are you using that regexp? In a buffer with re-search-forward or against a string with string-match/string-match-p/replace-regexp-in-string etc.? In the former case you should use the ^ and $ anchors. In the latter case there should be two backslashes before the backtick at the start of the regexp. Commented Jul 17, 2017 at 16:15
  • @yassinphilip To clarify, in a buffer containing the filenames you list, this should work: (re-search-forward "^[^.]+\\.dsp$"). Unless I'm missing something, that is. Commented Jul 17, 2017 at 16:31