grep with regular expression

The following command helped me to search through a very large log file and find matching entries using a regular expression

grep -E --only-matching 'GET /some/path/([A-Za-z0-9?=&_/\-]*)' access.log > result.txt

“-E” will tell grep to use extended regular expressions
“only-matching” will return only the matching string and not the whole line
The optional “> result.txt” will save the output to a text file.

In this special case the regex matches all GET requests to “/some/path” including all parameters. It will match until the white space that follows the URL.