Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^3: Regex question

by betterworld (Curate)
on Oct 14, 2008 at 10:55 UTC ( #716939=note: print w/replies, xml ) Need Help??


in reply to Re^2: Regex question
in thread Regex question

If you're using /g in list context, and only want to capture the entire match, you don't need the parenthesis.

I don't think that this contradicts what I wrote.

I was only suggesting to use parentheses rather than /g, because I wouldn't use the /g flag unless I really want to match several occurrences.

(However, as Larry Wall put it: The argument against using an operator for other than its primary purpose strikes me the same as the old argument that you shouldn't have sex for other than procreational purposes. Sometimes side effects are more enjoyable than the originally intended effect.)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://716939]
help
Chatterbox?
[atcroft]: abner: Or are you wanting to do something where you need to bind an array to a placeholder (in which case the bind_param_array method may be of use.
[abner]: Thanks I will try out your suggestion.

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2017-01-24 04:06 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you watch meteor showers?




    Results (202 votes). Check out past polls.