japhy has asked for the wisdom of the Perl Monks concerning the following question:
I have a potentially malformed URL. It MAY be missing some of the leading characters of the "http://". That is, it might be tp://www.foo.com/ or ://www.foo.com; then again, it might be fine.
I am trying to determine WHAT I need to supply to the beginning of it. I know I could just do a check for ^http://, ^ttp://, ^tp://, and so on, but that seems so barbaric. Any ideas?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: What is missing from the beginning of this string? (direct)
by tye (Sage) on Oct 08, 2010 at 05:12 UTC | |
|
Re: What is missing from the beginning of this string?
by Marshall (Canon) on Oct 07, 2010 at 22:32 UTC | |
by japhy (Canon) on Oct 08, 2010 at 13:13 UTC | |
|
Re: What is missing from the beginning of this string?
by jakeease (Friar) on Oct 08, 2010 at 00:55 UTC | |
by aquarium (Curate) on Oct 08, 2010 at 03:51 UTC | |
|
Re: What is missing from the beginning of this string?
by dasgar (Priest) on Oct 07, 2010 at 23:00 UTC | |
by japhy (Canon) on Oct 08, 2010 at 00:47 UTC | |
by ambrus (Abbot) on Oct 09, 2010 at 09:22 UTC | |
|
Re: What is missing from the beginning of this string?
by ssandv (Hermit) on Oct 08, 2010 at 19:43 UTC |