Here is a short concise and easy-to-read regex with 34 characters:
^(25[0-5]|2[0-4]\d|[01]?\d\d?\.?){4}$
This is matching only numbers between 0 to 255.