Answer the question
In order to leave comments, you need to log in
How to use grep to print a match with a regular expression?
There is a binary file for two gigabytes (dump), you need to extract lines matching the pattern from it and save them to a text file. Tried
grep -P --regexp='PHPSESSID=(.+?);' dump.bin > result.txt
but as far as I understand, all the lines in which this regular expression occurs are written to the final file. I would like to get only what is contained in brackets.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question