title: Power BI Query - Extract text between delimiters to a new column
body: <p>I have a table that contains a text column in the following format:</p>
  
  <blockquote>
    <p>"random text [ABC-######] other random text"</p>
  </blockquote>
  
  <p>For all the rows containing "[ABC-" I would like to extract to a new column the "ABC-######" where ###### are random numbers at least 4 numbers but can be more.</p>
  
  <p>this is what I got so far working:</p>
  
  <pre><code>= Table.AddColumn(#"Changed Type", "Custom", each if Text.Contains([TextColumn], "[ABC") then "FOUND" else "NotFound")
  </code></pre>
  
  <p>But I'm not able to extract the substring with numbers.</p>
  
  <p>Can anyone help me please?
  Thank you
  dk</p>