Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Regex help

by Monk::Thomas (Friar)
on Jul 12, 2013 at 15:10 UTC ( #1043998=note: print w/replies, xml ) Need Help??


in reply to Regex help

Disclaimer: I don't recommend manual URL parsing at all, since URLs can get quite hairy.

Don't use a regexp at all? 'split' may or may not be more appropriate. It depends on how you want to process the URL parts later on.

my @url = split / \/+ /xms, $url;
$url[0] = http:
$url[1] = www.chi.com
$url[2] = business

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043998]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2016-12-03 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (56 votes). Check out past polls.