How to print the content between two brackets.For example: return [ server1.domain.com ,server2.domain.com ,server3.domain.com ]Expected result:    server1.domain.com ,   server2.domain.com ,   server3.domain.comHow to get the expected result?
Print content between brackets in different lines
text processing
With pcregrep:pcregrep -Mo 'return \[\K[^]]*'Multiline match on return [ followed by a sequence of non-] characters but only output the part to Keep (to the right of \K).