in reply to Re: How to use \l and \u in regex mathing patterns?
in thread How to use \l and \u in regex mathing patterns?

What an ugly hack.

If someone asks "How do I X with Y?", and you recognise that Y is a particularly bad way to accomplish X, then you are supposed to answer with the better way Z. If taking the question at face value, at least mention the caveats of Y.

  • Comment on Re^2: How to use \l and \u in regex mathing patterns?

Replies are listed 'Best First'.
Re^3: How to use \l and \u in regex mathing patterns?
by AnomalousMonk (Archbishop) on May 09, 2012 at 17:06 UTC

    I don't think it was a hack, ugly or otherwise. I think it was intended, and succeeds, as an example of the actual way interpolation control operators can work in a regex, which was the context of the original – albeit misguided, since pat_mc thought of them as character classes – question. (Although I must admit that, had I given the example myself, I might have mentioned that those operators are rarely used in that particular way.)

Re^3: How to use \l and \u in regex mathing patterns?
by Anonymous Monk on May 09, 2012 at 17:18 UTC

    If someone asks ...

    Somebody already gave that answer

Re^3: How to use \l and \u in regex mathing patterns?
by JavaFan (Canon) on May 09, 2012 at 18:26 UTC
    ... then you are supposed to ...
    No, you are not.