Michael Schmalle wrote:
> The only reason I don't like using the string is the esacped back 
> slash sequences.
If it's a concern, then when you build your regex don't escape the \'s, 
and as a last step before you convert them to strings just do a quick 
find/replace with \ to \\ on the regex.
>
> ?var\\s([a-zA-Z_]+)\\s?:?\\s?([a-zA-Z_]+)(\\s?=\\s?(.*))?;?
>
If you're looking for

"var ident:type = value;" don't forget that identifiers can be more than 
just [a-zA-Z_] in ActionScript.  A slightly better expression might be 
[a-zA-Z_$][0-9a-zA-Z_$]* which allows for a variable name such as 
"$person7"  To make sure you don't miss anything, you can check out the 
language spec [1] for the structure of identifiers.

-d

[1] http://livedocs.macromedia.com/specs/actionscript/3/



--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to