matching regex in awk/gawk : <p>Can someone make the <code>awk</code> line below work in awk please. The syntax uses the standard PCRE regex standard (and i need to expect that some non-numeric characters are preceded to the first number, that is the string can look like <code>"++3.59  ±   0.04* "</code>). (note that I tried <code>[0-9]</code> and <code>[:digit:]</code> instead of <code>\d</code>) also note that I did read <a href="https://www.gnu.org/software/gawk/manual/gawk.html#Regexp" rel="nofollow noreferrer">https://www.gnu.org/software/gawk/manual/gawk.html#Regexp</a></p>

<pre><code>gawk 'BEGIN{test="3.59 ± 0.04";match(test, /^.*?(\d+?\.\d+?)\s*?±\s*?(\d+?\.\d+?)$/, arr);print arr[1];}'
</code></pre>
