Lex Thoonen wrote:
> Hi,
> 
> I'm trying to do this:
> 
> in the original text is this:
> 
> ((se-HomePage|Svenska))
> 
> I want to leave it at just:
> 
> Svenska
> 
> So I tried this:
> 
> $row[3] =~ s|\(\(.*?\|(.*?)\)\)|$1|g;
> 
> but somehow after substituting it now shows:
> 
> ((se-HomePage|Svenska
> 
> 
> I don't get it.
> 
> Someone here?

$string =~ s/.*\|(.*?)\).*/$1/g;

...or:

my $string = "((se-HomePage|Svenska))";
$string =~ /\|(.*?)\)/;
$string = $1 if $1;

Steve

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to