在PHP中的Posix / Perl正则表达式

I have the simple regular expression:

\{[0-9]*\}

which works fine with PHP's ereg_ functions (Posix compatible), but I need to use the preg_match_all function, which doesn't have an ereg_ equivalent. My expression above doesn't seem to work with preg_ (perl compatible) functions. How can I go about "converting" it to be perl compatible?

If im reading your regex correctly then just do this:

preg_match_all('/\{\d*?\}/'...);

'/\{\d*?\}/' will match an integer of any length.