Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: Regex expression is matching more than once (regex expressions don't do stuff)

by Anonymous Monk
on Apr 22, 2013 at 08:45 UTC ( #1029822=note: print w/replies, xml ) Need Help??


in reply to Regex expression is matching more than once

Here is a regex expression, it doesn't do anything

my $rex = qr/(.)/;

Operators do stuff, here is a regex inside an operator, the substitution operator, replace operator, s///

$captured_and_released =~ s/$rex/$1/;

And match operator, m//atch operator, m//

( $xerox ) = $original =~ m/$rex/;

The tr///ansliteration operator does not use regex expressions

Remember the operator name, its the function that does stuff :)

  • Comment on Re: Regex expression is matching more than once (regex expressions don't do stuff)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029822]
help
Chatterbox?
[marto]: good morning all

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2016-12-06 09:17 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (101 votes). Check out past polls.