Question : How to use sed command to remove text before and after desired syntax?

I have a log file with over 1000 lines of data.  All the lines vary greatly, but look similar to this:

foiur0-9uvslknk2p [name=john.doe;mid=alkj2opup2jflksjd-epojf] kjaldjfopweiukj
dkfjlkjsd [name=jane.doe;mid=oqiueroindvon] lkadj02ouroijdflkj2

What I would like to do is remove the characters before and after the name, so that I'm left with output:

john.doe
jane.doe

Note:  If sed is not the best method, please share what would be...  Thanks.

Answer : How to use sed command to remove text before and after desired syntax?

Could you try:
cat <filename> | sed '/=/,/;/d'

That's the usual way of "piping" the output from one command to another. Likewise, you could run;
cat <filename> | cut -d'=' | cut -d';'

That's not, necessarily, how sedgwick intended it to be run but it might get you the results you want. If either of those commands work, just add:
> <output_file>
at the end and it will create a new file.
Random Solutions  
 
programming4us programming4us