I want to match white space at the beginning of the line but only the the next word is PATCH, PUT, POST or GET
edit_user_registration GET /users/edit(.:format) registrations#edit
PATCH /users(.:format) registrations#update
In the case above only the second line white space. I tried this:
(^\s*)+(POST|GET|DELETE|PUT|PATCH|OPTIONS)
Problem is this will match even the "PATCH" word but want to match only the whitespace before "PATCH".