fixed regular expression and added reverse integer