"Negative look-behind"? This is (except for the name) a rather cool feature i just now learned. I'd give you more than one "++", but i'm not allowed to...
BREW /very/strong/coffee HTTP/1.1
Host: goodmorning.example.com
418 I'm a teapot
| [reply] |
Now that is very cool, I can see using that a lot! Somwhow I've never ran across that ability before, despite skimming pealre countless times.
Thanks very much! | [reply] |
The various new look-ahead/behind assertions from 5.10 are very cool, but I'll admit I haven't used them enough to find them handy yet, so in a case like this, I still think, "I want to get rid of every slash that follows a character other than a less-than, so I'll capture that character and replace them both with it," leading to this:
s|([^<])/|$1|g;
However, I just benchmarked that compared to your look-behind method, and yours is 75% faster. Guess I need to start learning those newer assertions, and not just for when it's impossible to do something the old way!
| [reply] [d/l] |