News for hackers. Stuff that matters.
Re:PyPy 2.0 Released by jholman on Thursday May 09, 2013 @10:10PM (#5684139)
Exactly. Perl regexes have _poor_ performance in terms of running time, but good usability, including by squeezing non-regular features into their allegedly-regular expressions, and also things like numerous and flexible character classes, consistent behaviour for escapes, etc.

I love vim, but jesus I can never remember which vim regex metacharacters need escaping to get their meta-meaning, and which need escaping to get their non-meta meaning.

Re:PyPy 2.0 Released by Leszek on Friday May 10, 2013 @07:03AM (#5685542)
Re:PyPy 2.0 Released by jholman on Friday May 10, 2013 @01:21PM (#5687471)
I sort of prefer \V, but same difference

I dunno, I haven't used it in the past, because...

1) "It is recommended to always keep the 'magic' option at the default setting, which is 'magic'. This avoids portability problems."

2) Nor do I want to type two extra characters in every damn regex!

So, it only occurs to me right now, the right thing to do for me is this: the first instant I'm confused about whether \( means grouping or literal paren, I should immediately start my pattern with \v or \V. No unportability of plugins, no marginal cost on regexes that don't care, marginal benefit when it does matter.

Re:PyPy 2.0 Released by Leszek on Sunday May 12, 2013 @01:02PM (#5694915)
Yeah, that's basically what I do too. No \v on trivial regexes, \v on ones where there's more than one or two groups.