Is it intentional that the last one's only got three parts to it? Anyhow, here's one regex that'll work:
/^(?:[\dx]{1,3}\.){0,3}[\dx]{1,3}$/
This will match between 1 and 4 blocks, each consisting of 1 to 3 digits or x's, separated by periods.
Are you dealing with IP addresses there? If so, you may also be interested in Net::IP::Match, Net::IP::Match::* and Net::IP::CMatch.
EDIT: the OP both edited his post and changed the examples of strings he'd like to match after I posted the above. For reference, this was the original post, in its entirety:
I am trying to have a Regex for a dotted number format as shown below
- 8.1xx.x.x
- 9.0.3xx.x
- 9.0.4xx.x
- . . .
- 9.1xx.x
So any thoughts how I can make a generic regex for matching all these patterns.