mtsachev has asked for the wisdom of the Perl Monks concerning the following question:
Using s/$&/$html/; on the last line instead of $` . $html . $' doesn't make much difference.my $re = qr/$this->{mask_start}\Q$key\E(.*?)$this->{mask_end}(.*?)$thi +s->{mask_start_close}\Q$key\E$this->{mask_end_close}/is; while ($this->{template} =~ /$re/) { my $params = $this->mask_block_params($1, $2); my $html = &$callback($key, $params); $this->{template} = $` . $html . $'; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Regex speed issue
by tlm (Prior) on Aug 30, 2005 at 12:15 UTC | |
by mtsachev (Initiate) on Aug 30, 2005 at 15:03 UTC | |
|
Re: Regex speed issue
by GrandFather (Saint) on Aug 30, 2005 at 11:26 UTC | |
by mtsachev (Initiate) on Aug 30, 2005 at 11:44 UTC | |
|
Re: Regex speed issue
by RMGir (Prior) on Aug 30, 2005 at 11:57 UTC | |
|
Re: Regex speed issue
by diotalevi (Canon) on Aug 30, 2005 at 13:24 UTC | |
by mtsachev (Initiate) on Aug 30, 2005 at 15:23 UTC | |
by mtsachev (Initiate) on Aug 31, 2005 at 12:43 UTC |