Solved

REGEXP for URL not working

Posted on 2008-10-22
3
471 Views
Last Modified: 2008-12-11
Hi Guys,

I am trying to check a URL however its not working,

I am only concerned that the start is a protocol ie http https or ftp.

Here is what I got


var pattern:RegExp = new RegExp("/^(ftp|http|https):\/\/");
			trace("testing " + event.currentTarget.text);
			trace(pattern.test(event.currentTarget.text));

Open in new window

0
Comment
Question by:jdunneuk
3 Comments
 
LVL 4

Accepted Solution

by:
ngiamouris earned 125 total points
ID: 22775891
try:
var pattern:RegExp = new RegExp("^(ftp|http|https):\/\/");
0
 
LVL 3

Author Comment

by:jdunneuk
ID: 22775958
thanks ngiamouris
0
 
LVL 63

Expert Comment

by:Zvonko
ID: 22868110
Is this solved?
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
Building a successful professional career is a long and difficult journey, especially in case if your decisions are not chosen carefully. For example, if you think that you can get to the desired position without experience and apply for it, your ch…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question