Re: why warn on undefined $1?
- From: "Dr.Ruud" <rvtol+news@xxxxxxxxxxxx>
- Date: Thu, 30 Aug 2007 23:37:00 +0200
ihok@xxxxxxxxxxx schreef:
Ben Morrow:
Or (better IMHO), use look-around assertions:
my $str = 'color colored tricolor floor';
$str =~ s/ (?<= col) or (?= (?: ed|ing|s)? \b) /our/gx;
print $str;
# colour coloured tricolour floor
Whoa. That's heavy.
$str =~ s{ (?<= colo) (?= r(?: ed|ing|s|) \b) }
{u}gx;
--
Affijn, Ruud
"Gewoon is een tijger."
.
- References:
- why warn on undefined $1?
- From: ihok@xxxxxxxxxxx
- Re: why warn on undefined $1?
- From: xhoster
- Re: why warn on undefined $1?
- From: Ben Morrow
- Re: why warn on undefined $1?
- From: ihok@xxxxxxxxxxx
- why warn on undefined $1?
- Prev by Date: Re: How to make this case insenstive
- Next by Date: Re: Solaris 10 gcc 3.4.6 perl compile error HELP!
- Previous by thread: Re: why warn on undefined $1?
- Next by thread: Re: why warn on undefined $1?
- Index(es):