Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 502
  • Last Modified:

REGEXP for URL not working

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
jdunneuk
Asked:
jdunneuk
1 Solution
 
ngiamourisCommented:
try:
var pattern:RegExp = new RegExp("^(ftp|http|https):\/\/");
0
 
jdunneukAuthor Commented:
thanks ngiamouris
0
 
ZvonkoSystems architectCommented:
Is this solved?
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now