Basics:
"three numbers" -> "\d{3}"
"an optional dot" -> "\.?"
"a letter and two numbers, three times" -> "(\w\d\d){3}"
So that can come together to form this:
"one to three numbers and an optional dot, four times" -> "(\d{1,3}\.?){4}"
It would be even cooler if you could define patterns and then reuse them.
"an IPV4 address" -> "(\d{1,3}\.?){4}"
Obviously this has to be a little different to actually produce a valid IPV4, but you get the idea.
(can't resist, it'd be "one to three numbers and a dot, three times, then one to three numbers")
oh, and
[\d\w]
would be like "a letter or a number"