Solved

REGEXP for URL not working

Posted on 2008-10-22
3
466 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

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…
Data breaches are on the rise, and companies are preparing by boosting their cybersecurity budgets. According to the Cybersecurity Market Report (http://www.cybersecurityventures.com/cybersecurity-market-report), worldwide spending on cybersecurity …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

810 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