Guano has asked for the wisdom of the Perl Monks concerning the following question:
The case-insensitive matching works fine, as long as the strings don't contain any special swedish characters, like å, ä or ö. If $item_str contains the character ä and $search_str the character Ä I dont get a match. It is very important that this works (most of our customers are Swedish) and I know there is an easy solution to my problem. I just can't remember it. I hope someone can help me.foreach (@lines) { s/\n$//; @items = split /$field_separator/; $item_str = $items[$field-1]; if ( $item_str =~ m/^$search_str$/i) { # We have a match, do something! } }
Jocke
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Problem matching non-english chars
by btrott (Parson) on Apr 18, 2000 at 20:54 UTC | |
by Guano (Initiate) on Apr 20, 2000 at 11:14 UTC | |
|
Re: Problem matching non-english chars
by chromatic (Archbishop) on Apr 18, 2000 at 18:55 UTC | |
by Guano (Initiate) on Apr 20, 2000 at 11:03 UTC | |
|
Re: Problem matching non-english chars
by lhoward (Vicar) on Apr 18, 2000 at 22:22 UTC | |
by Guano (Initiate) on Apr 20, 2000 at 11:21 UTC |