Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I search in Emacs without wrapping around the beginning of the file? And how can I search with regular expression e.g. i want to search 'service*start' (* is something)?

Thank you

share|improve this question

1 Answer 1

Emacs search (Ctrl+s) will go to the end of the file and then display this message: "Failing I-search: foo". You then have the choice of wrapping if you hit Ctrl+s again.

The shortcut for a regex search is Ctrl+Alt+s. So, to search for the pattern you specified, you would hit that key combination, and then type:

service.*start

You can also access the regex search function through the emacs menus if you are using an emacs GUI or, by pressing Alt+x and then typing

search-forward-regexp

and hitting enter.

For more information on the emacs regex format, see here.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.