On Wed, 28 Jun 2006 09:19:15 -0700, Loo, Peter # PHX wrote:
> Would some one know of a one liner that would replace the third
> occurrence of a substring within a string? For example:
> $string = "?, ?, ?, ?";
my $o = 2; # will replace the third "?"
$string =~ s/^((\?, ){$o})\?/$1 to_date(\?, xyz)/;