PHP error, preg_replace?

I get this error message when posting certain message in my site, its a contacts board, and the content of the text is not being stored in the database, so this is a crytical error :( how can i solve this?

I also sen attached the code in config.php

Warning: preg_replace() [function.preg-replace]: Compilation failed: POSIX named classes are supported only within a class at offset 21 in /mounted-storage/home43a/sub004/sc31952-BMDX/www/contacts/config.php on line 725

function FilterMessage($message){
//eregi_replace( "^([_\.0-9a-z-]+)@([0-9a-z][0-9a-z-]+)\.([a-z]{2,6})$", '\\1 at \\2 dot \\3',$message);
$message = preg_replace("#(\w|\.)+?@(\w|\.)+?\.[:a-z:]{2,4}?#is","##",$message); //eliminate email addresses(this is line 725)
$message = strip_tags($message);
$message = nl2br($message); //keep carriage returns
return $message;

Open in new window

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

From what  I understand... the posix error is coming from this [:a-z:]{2,4} ... can you change that to [a-z]{2,4} ???

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
axturAuthor Commented:

thank you for your answer, but how can this error show up now, since this code has been working for over a year so far?

I can't understand :(

anyway im gonna apply the suggested change and let you know if it works out.

thanks again!
axturAuthor Commented:
It worked, probably somme inner software update in the server??

thank you!
I'm guessing it was an update that caused the code to stop working... perhaps a POSIX extension was installed and/or enabled... not sure... i'm glad that it's working now.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.