Question
RegExp > Match method is crashing. why?
with below code, match method crash
var str:String="<p><b><i>The Test-01 RegExp class</i>lets you work</b>with \nregular expressions, which are patterns that you can use to perform searches in strings and to replace text in strings.<p>You can create a new RegExp object by using the <code>new RegExp()to a variable:</p>";
//
function tryIt(s:String) {
trace(s.match(/^\w*/gm)); // Match a word at the beginning of the string.
}
tryIt(str);
any succestion ?
regards,
Burak
delizade@gmail.com
www.delizade.com
var str:String="<p><b><i>The Test-01 RegExp class</i>lets you work</b>with \nregular expressions, which are patterns that you can use to perform searches in strings and to replace text in strings.<p>You can create a new RegExp object by using the <code>new RegExp()to a variable:</p>";
//
function tryIt(s:String) {
trace(s.match(/^\w*/gm)); // Match a word at the beginning of the string.
}
tryIt(str);
any succestion ?
regards,
Burak
delizade@gmail.com
www.delizade.com