Perhaps better, untested: `^2[0-9]{3}-[01][0-9]-[0-3][0-9]T[0-2][0-9]:[0-5][0-9]:[0-5][0-9]([+][0-9]+)?\b`

(It makes the timezone optional.)

`\b` is "word boundary"