[thelist] regex

Joxn joxn at vernum.com
Sat Sep 2 15:44:50 CDT 2000


Once again, my beloved list of country names causes troubles...

For example, I have this string:
$names = "Ab Station<br>  Deutschland (Osten), England";
(yupp, exactly this thingy...)

Now I want to substitute each of these German names with their
translation.

I tried this:

foreach ( @regions )
{
	$names =~ s/$_/$translation{$_}/g;
}

While @regions is a list of all the values and $translation{$_} brings
up the translation.

I'm having trouble with the blanks in the values. I can translate
"England" just fine, but fail at all the names that consist of two
words.

Any ideas what I can do now?
TIA,
Joxn
-- 
   || //\\ \\// |\\||  ::  mailto:joxn at vernum.com  ::
 \\|| \\// //\\ ||\\|  ::      ICQ:8053703         ::




More information about the thelist mailing list