I am in need of some regex help. I need to pull out a string of numbers for a single line.
The input can look like this, these are 3 separate examples:
o.text text 336 09-Dec-11 13:33:10
o.text text 3350126 09-Dec-11 13:33:10
o.texttext text 30473 09-Dec-11 13:33:10
I need to pull out the middle number, 336, 3350126, 30473
I am close, I think, here is the command I am running:
sed -r 's/([0-9]+).*/\1/'
Any help would be greatly appreciated!!