Hi roadman1977,
Welcome to InfopathDev
I would suggest using a formula such as the one below. What it does is that it returns the last two characters of a string, and from there use a rule which is triggered by a condtion that if the populated field is not equal to numbers, then set a certain field to a value of 0.
substring(field1, string-length(field1) - 1, 2)
where field1 is the username field.
Please let me know if this helps.