My file is in JSON format is looks like this:name: Tom species: mouse name: Stu species: cat name: Carter species: DogI have a file that is one long string, and I would like to extract only the names from this list.  So the desired output is something like this:Tom Stu CarterI've had a lot of failed attempts at sed, for examplecat alphabet | sed 's/^.*name: \(.*\) species*/\1/g'Output:Tom species: mouse name: Stu species: cat name: Carter : DogI have a lot of really big files I'd like to do this with so if there is an efficient way to go about this that would be great
Extract multiple instances of text between the same two lines of text
text processing;sed