First off, always use the proper bbcode tags when posting code on this forum: php for php code, html for html code and code for other code. Next up, always indent your code so that it's readable.
You have 4 errors in your code.
The first one is because of string interpolation.
"{$/"
The second one is because you aren't using a defined function.
pre_match
The third is because your pattern is incorrect
{5{
The fourth is because your logic is flawed
if (preg_match())
{
echo 'The format must be in the format you allready provided me with';
}