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

Re: Perl RegEx (url explode)

by choroba (Chancellor)
on Nov 01, 2012 at 22:53 UTC ( #1001881=note: print w/replies, xml ) Need Help??


in reply to Perl RegEx (url explode)

I noticed just one problem: the placement of the final question mark. The whole port part is optional, together with the colon:
m% (http(?:s?))? # http (?:(?:://)? (w{0,3})\.{0,1})? # www ((.*)(?:\.)([^:]*)) # domains (?::(\d+))? %x; # port
Edit: . changed to [^:] in # domains.
لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1001881]
help
Chatterbox?
[marto]: good morning all
[Corion]: Hi marto! ;)
[Discipulus]: morning both!
[Corion]: Hi Discipulus!
[Corion]: My pictures from the vacation are now online ;)

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (9)
As of 2017-02-27 10:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Before electricity was invented, what was the Electric Eel called?






    Results (378 votes). Check out past polls.