how can I (interactive) search for <beginningOfLine>,

I tried ^ which means beginning of line in perl Also \A which does signified the same in ruby.

C-s ^, C-s \A,

I also tried search-forward-regexp with above.

# /tmp/routes.txt
1,GET    /clients/:client_id/committees/:id,,,,,,,,,,,,,,,,,,,
1,GET    /clients/:client_id/committees/:id/edit,,,,,,,,,,,,,,,,,,,
1,GET    /clients/:client_id/committees/new,,,,,,,,,,,,,,,,,,,
,POST   /clients/:client_id/committees,,,,,,,,,,,,,,,,,,,
1,GET    /clients/:client_id/committees,,,,,,,,,,,,,,,,,,,
  • 3
    C-u C-s to call isearch-forward-regexp, use "^,"
    – nichijou
    Commented Feb 3, 2023 at 0:41
  • gold! thanks for that Commented Feb 3, 2023 at 0:52
  • I suspect that this is a duplicate - but if not, then @nichijou's comment should be made into an answer.
    – NickD
    Commented Feb 3, 2023 at 17:14

1 Answer 1


Use isearch-forward-regexp. Its binding is C-M-s, you can also invoke it with C-u C-s.

The regexp Emacs used for line beginning is ^.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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