Answer the question
In order to leave comments, you need to log in
HTML parsing. How to pull flashvars through regular expression?
Good afternoon
Tell me why preg always produces a zero result:
var page:String = e.target.data;
var result:Array = page.match(/flashvars=\"(.*?)\"/gi);
trace('flashvars', result.length );
Answer the question
In order to leave comments, you need to log in
Here is the solution
var page = e.target.data;
var finder:RegExp = /name=\"flashvars\"\s+value=\"(?P<flashvars>.*)\"/gi
var result:Array = finder.exec(page);
trace('flashvars', result.flashvars );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question