Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: How to replace in one regexp

by vitoco (Friar)
on Sep 30, 2009 at 16:27 UTC ( #798387=note: print w/ replies, xml ) Need Help??


in reply to How to replace in one regexp

my $path = $1 if $target =~ m!^([^?]*?/)?([^/\?]*)(\?(.*))?$!;
  • $1 : path
  • $2 : file or script name
  • $3 : query string
  • $4 : query string without leading "?"


Comment on Re: How to replace in one regexp
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (7)
As of 2015-07-07 03:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (87 votes), past polls