Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
Ryan Matsikas wrote: yes. I couldn't find any documentation and although it works I get an error as alert. var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); var m = m_arr[0]; var c_string = m.substr(1,m.length-2); fl.trace(found: +c_string); the string is correctly traced but I

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); var m = m_arr[0]; var c_string = m.substr(1,m.length-2); fl.trace(found: +c_string); I solved in this way: var re = new RegExp(\[^\]+\,gi); var m_arr = re.exec(line); if(m_arr){ var m = String(m_arr); var c_string =

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Ryan Matsikas
the proper way todo it would be var re = new RegExp(\[^\]+\,gi); var result = re.exec(line); while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } On 3/2/06, Christian Giordano [EMAIL PROTECTED] wrote: var re = new RegExp(\[^\]+\,gi); var m_arr =

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Ryan Matsikas
opps trace result not c_result On 3/2/06, Ryan Matsikas [EMAIL PROTECTED] wrote: the proper way todo it would be var re = new RegExp(\[^\]+\,gi); var result = re.exec(line); while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } On 3/2/06, Christian

Re: [Flashcoders] Regex in JSFL?

2006-03-02 Thread Christian Giordano
while (result != null) { fl.trace(found: +c_result); var result = re.exec(line); } it makes sense, thanks! chr -- ___ { Christian Giordano's site and blog @ http://cgws.nuthinking.com }

[Flashcoders] Regex in JSFL?

2006-01-29 Thread keith
Does JSFL let you use Regular Expressions like you can in Javascript? -- Keith H -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] Regex in JSFL?

2006-01-29 Thread Ryan Matsikas
yes. On 1/29/06, keith [EMAIL PROTECTED] wrote: Does JSFL let you use Regular Expressions like you can in Javascript? -- Keith H -- ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com