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

Re: regex to remove a word from string

by mendeepak (Scribe)
on Dec 04, 2014 at 05:55 UTC ( [id://1109202]=note: print w/replies, xml ) Need Help??


in reply to regex to remove a word from string

I do not know whether this is a correct approach.

$str = "auth_plugin_stack = a,b,EXT::USCC::USCCAuth,c,d"; print "$str \n"; $str =~ s/((\w+::)+\w+,)//; print "$str \n";
answer:
auth_plugin_stack = a,b,EXT::USCC::USCCAuth,c,d auth_plugin_stack = a,b,c,d

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-25 15:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found