extract the month of a string
<p>I need to extract the month from a series of strings in the format:</p>

<pre><code>Tue Jan 05 03:29:10 CET 2016
</code></pre>

<p>I have tried with:</p>

<pre><code>#extracting the second capturing group
sub("([A-z]{3})\\s([A-z]{3})","\\2","Tue Jan 05 03:29:10 CET 2016")

#or just the first whitespace with the Month:
sub("\\s([A-z]{3})","\\2","Tue Jan 05 03:29:10 CET 2016")
</code></pre>

<p>My expected output, in this case would be:</p>

<pre><code>"Jan"
</code></pre>