Skip navigation
Currently Being Moderated

Regex issues with match

Jun 25, 2012 3:27 AM

I have an issue with this regex, I would expect to capture this

 

site/FLEX/system

 

in the matches array:

 

var pattern:RegExp = /http:\/\/([\w-]+\/\w+\/\w+)/g;

 

var matches:Array =  "http://site/FLEX/system/debug/main.html?debug=true".match(pattern);

 

but the only group I get is http://site/FLEX/system

 

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points