Hello,
That makes perfect sense. I have raised a feature request and have attached
a patch containing both countLines() method implementation and phpt tests.
thx
On Sun, Mar 13, 2011 at 9:39 PM, Etienne Kneuss wrote:
> On Mar 11 23:22:04, Sebastian Marek wrote:
> > Hi,
> >
> > I have recently
What is more likely to be wrong? Your understanding of a specific
regex pattern (which happens to be full of escapes making it
incredibly hard to read) or the implementation of preg_replace?
~Hannes
On 14 March 2011 16:18, Martin Scotta wrote:
>
> I chose the simplest example to show the preg_re
The presented patch is just a quick and dirty work that I could put
together in 2 days, with knowledge of the zend engine. Thanks to some
tips from Pierrick, I'm slowly improving its quality.
However my ideal goals are pretty close to what you have done in your
rfc. Today Pierrick added the possib
On 15/03/11 5:38 AM, Ben Schmidt wrote:
On 15/03/11 2:18 AM, Martin Scotta wrote:
I chose the simplest example to show the preg_replace behavior,
You've GOT to be kidding. The SIMPLEST?!
How about an example that doesn't require escaping ALL the interesting
characters involved?
Here's a modi
On 15/03/11 2:18 AM, Martin Scotta wrote:
I chose the simplest example to show the preg_replace behavior,
You've GOT to be kidding. The SIMPLEST?!
How about an example that doesn't require escaping ALL the interesting
characters involved?
Here's a modified version that I think it quite a bit
Hi all,
I promise myself to not revamp this discussion again, but it wasn't me
this time!
@Etienne: That RFC is outdated.
Since the last feedback form internals list, a lot of changes have
been made to that RFC. Maybe I should update it ASAP so you can
clearly understand what have changed to be c
On 14 March 2011 15:18, Martin Scotta wrote:
> function test($str) {
> static $re = '/(^|[^])\'/';
> static $change = '$1\\\'';
>
> echo $str, PHP_EOL,
> preg_replace($re, $change, $str), PHP_EOL, PHP_EOL;
> }
>
> test("str '' str"); // bug?
> test("str \\'\\' str"); // ok
> t
I chose the simplest example to show the preg_replace behavior, there are
better (and safer) ways to scape slash characters.
Anyways, *is this the expected preg_replace behavior?*
Martin