title: Sed not reading multiline input?
body: <p>I have some text as below:           </p>
  
  <pre><code>path =&gt; ["/home/Desktop/**/auditd.log",
          "/home/Desktop/**/rsyslog*.log",
          "/home/Desktop/**/snmpd.log",
          "/home/Desktop/**/kernel.log",
          "/home//Desktop/**/ntpd.log",
          "/home/Desktop/**/mysql*.log",
          "/home/Desktop/**/sshd.log",
          "/hme/Desktop/**/su.log",
          "/home/Desktop/**/run-parts(.log"
      ] 
  </code></pre>
  
  <p>I want to extract the values inside <code>[</code> <code>]</code>, so I am doing:</p>
  
  <pre><code>sed -n 's/.*\[\(.*\)\]/\1/p'
  </code></pre>
  
  <p>Sed is not returning anything. </p>
  
  <p>If I do <code>sed -n 's/.*\[\(.*\)log/\1/p</code> it's returning properly the string between <code>[</code> and <code>log</code>.</p>
  
  <pre><code>"/home/Desktop/**/auditd.",
  </code></pre>
  
  <p>So it's able to search within the line.</p>
  
  <p>How to make this work??</p>
  
  <p>EDIT:</p>
  
  <p>I created a file with content:                      </p>
  
  <pre><code>path =&gt; [asd,masd,dasd
  sdalsd,ad
  asdlmas;ldasd
  ]
  </code></pre>
  
  <p>When I do <code>grep -o '\[.*\]'</code> it does not work but <code>grep -o '\[.*'</code> this returns the 1st line <code>[asd,masd,dasd</code>. So it's working for single line not for multiple lines.</p>