in reply to Re: Ternary inside a regex
in thread Ternary inside a regex
Changed my code to the following and it works:
$message =~ s~\[size=(.+?)\](.+?)\[/size\]~($1 > 5) ? "<font size=\"5\ +">$2</font>" : "<font size=\"$1\">$2</font>"~eisg;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Ternary inside a regex
by izut (Chaplain) on Sep 23, 2005 at 12:46 UTC | |
by kiat (Vicar) on Sep 23, 2005 at 13:12 UTC |