my $ugly_regex = '! / # match / \w*? # match optional minimum word characters (/dir) /? # match single optional / \w*? # match optional minimum word characters (/dir/dir) /? # match single optional / \w*? # match optional minimum word characters (/dir/dir/dir) /? # match single optional / \w*? # match optional minimum word characters (/dir/dir/dir/dir) \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d+? # match 1 or more numbers \s? # match a single optional whitespace \d*? # match 0 or more numbers \s? # match a single optional whitespace \d*? # match 0 or more numbers !x';