[Israel.pm] A simpler regex required

Yuval Yaari yuval at windax.com
Thu Aug 16 03:08:39 PDT 2007


Peter Gordon wrote:
> How about the following - at least it looks symmetric.
>
> $str =~ s{<td.*?>\K(.+?)\L</td>}{htmlify()}egx;
>
> \L would perform a function similar to \K, only forward looking

I vote +1 for a backslash sequence for lookahead, agreed :-)
That being said, \L is "Lowercase till \E" (check out perldoc 
perlrebackslash, we don't have many options :)).

  ~Y



More information about the Perl mailing list