Replace eregi?

I have an old script that I am reusing in a new one.
But I think I read somewhere that eregi is something one should not use anymore.
What should I replace my line with then?

I have a form where people register. My script is supposed to check that the fields are correct.
That they actually write their name, e-mail and so on.

The one I have now is:

if($user_name != "" && eregi('[a-z | A-Z]+',$user_name)){
$debug=TRUE;
} else {
$debug=FALSE;
$message[]="<span class='error'>You need to fill in a correct name</span><br />";
}

That one is looking for letters in the field.
What should I replace this code with in my script?

And… this time I want the code to work in other languages too. I need people to be able to use swedish charcters (å ä ö, Å Ä Ö) and german (like ü or Ü or whatever). I guess my code is only accepting a-z and A-Z.

Is there a way to make my code work in a better way?

You might check http://www.freecontactform.com/email_form.php
They have there something like:

$string_exp = "/^[A-Za-z .'-]+$/";

if(!preg_match($string_exp,$first_name)) {
$error_message .= ‘The First Name you entered does not appear to be valid.<br />’; }

You will be able to build your ‘$string_exp’ as you need…

But what about other characters (outside of a-z)?

I would try to insert them in ‘$string_exp’ definition but outside the ‘’ or go comparing their hex value (like we used to do with ASCII) if you are in UTF8

What about the ‘preg_match’? Did it work?