I think a generic pattern like `/WordPress (3(?:\.\d+){1,2})/` would be better. You can then access the matched version number with `$1`.