Extract number between 2nd space and "," in R : <p>I have a r data frame. One of its column "A" has string. I would like to extract the number between <strong>second</strong> space in string and <strong>","</strong>. </p>

<p>The data frame looks like</p>

<pre><code>       A        
XY Z 123, 30009 Addr
AB CBA 12, 900000 Addr
FC AX 1234, 977777 Addr
.
.
</code></pre>

<p>And the resultant df should look like </p>

<pre><code>       A
123
12
1234
.
.
</code></pre>

<p>The numbers that need to be extracted are not fixed in length.</p>
