in reply to Annoying Regex issue with forign chars
use strict; use warnings; use utf8; binmode STDOUT, ':encoding(UTF-8)'; $_ = 'été'; my $desc = "test 123 un été à Tanger. élargir elargir ete"; $desc =~ s|\b\Q$_|<a href="url">$_</a>|sg; print $desc, $/; __END__ test 123 un <a href="url">été</a> à Tanger. élargir elargir ete
I've described that in much more detail in this article, and you could also read perluniintro, the Encode documentation, perlunifaq and perlunicode.
|
|---|