S
S
synapse_people2017-12-01 20:16:41
linux
synapse_people, 2017-12-01 20:16:41

How to select a regular substring from a file?

Prompt
There is a file, it has a lot of lines
. You need to select all the matches that fall under the regex.
That is, 1 line at the output - 1 match . The
line is not needed, but only where it matched
. If on 1 line in the input. file more than 1 match, should return each as a new line..

Is there such a solution?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
chupasaurus, 2017-12-01
@synapse_people

grep -o

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question