in reply to regex finding shortest string containing n of $c

This would've been more interesting if it weren't confined to the start of the string. And by "interesting", I mean it would have presented an opportunity to showcase forced backtracking in a regex among some of the other powerful things regexes can do.

Jeff japhy Pinyan, P.L., P.M., P.O.D, X.S.: Perl, regex, and perl hacker
How can we ever be the sold short or the cheated, we who for every service have long ago been overpaid? ~~ Meister Eckhart
  • Comment on Re: regex finding shortest string containing n of $c