Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

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

by Anonymous Monk
on May 09, 2012 at 16:54 UTC ( [id://969665]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://969665]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others avoiding work at the Monastery: (3)
As of 2024-04-20 04:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found