If you are an Org Admin, go to Settings > Organizations. On the Org Settings tab (the default tab) go to the Case Number Formatting section.
If you want to require a case # format then you need to turn On the Require Formatting Option. In the box titled Formatting Pattern you will want to enter a valid pattern (see pattern options below).
In the Test Formatting Pattern here box you can test the format you applied in Formatting Pattern. A valid pattern will leave the box glow blue in color and a invalid pattern will leave the box glow red.
You can also enable a default value for the Case # field by turning on the Default value on / off option.
NOTE: This formatting option is only applied for the new Case entry page. We did not apply this formatting to the Case update page so that you could add old cases or cases that do not apply to this format. So if you need to enter a case without these parameters, you must enter as a valid format and then update it to be anything you want.
\d = A number value
\w = A letter value
Exp \d\d-\d\d will require that the case number be something like 12-34. Anything other than two numbers, hyphen and then two more numbers will be invalid.
\w\d-\w\d will require a value like A1-B2
You can string these numbers and characters in any format you like.