Test, validate and match regular expressions
This regular expression matches lines containing a four-digit number from 1950 to 9999, requiring a preceding space. It captures values in the 1950-1999 range (19[5-9][0-9]) or the 2000-9999 range ([2-9][0-9]{3}). This pattern is highly useful for filtering lists of file names or text lines that include specific years or numerical thresholds.