you could do this by using the regular expression validation.
Here is an example that will force the string to begin with "sw", allow a 1,3 or 5 as the third character (/^sw(1|3|5)), followed by a blank space (\s) and 3 letters or numbers ([a-zA_Z0-9]{3})
/^sw(1|3|5)\s[a-zA_Z0-9]{3}$/i