#!/bin/bashs="ACB 01900 X1911D 1910 1955-2011 3424 2135 1934 foobar"grep -Po '^(?:.*\s)?\K(?:19\d{2}|20(?:[0-4]\d|50))(?!\S)' <<< "$s"
Standard input is empty
1934
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!