Solved

REGEXP for URL not working

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

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…
What is Backup? Backup software creates one or more copies of the data on your digital devices in case your original data is lost or damaged. Different backup solutions protect different kinds of data and different combinations of devices. For e…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

707 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now