RE: [Flashcoders] regular expressions in Flash8?
>// replace /descr with txt = txt.split('/descr').join('http://keithreinfeld.home.comcast.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Juan Carlos Anorga Sent: Friday, May 18, 2007 2:25 PM To: flashcoders@chattyfig.figleaf.com Subject: Re: [Flashcoders] regular expressions in Flash8? well... you can't really use regular expressions in flash8 unless you let javascript in the browser do it for you. I don't think you need regexp to solve your problem though. I think you could just do this: var txt:String = "test/descr can we now use regularexpressions in Flash8 to manipulate strings? > > I need to replace all instances of "/descr" with " actionscript.. >but.. some instances of " want to change those if possible. thanks for any insights. > > -Boyd > ___ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] regular expressions in Flash8?
well... you can't really use regular expressions in flash8 unless you let javascript in the browser do it for you. I don't think you need regexp to solve your problem though. I think you could just do this: var txt:String = "test/descr can we now use regularexpressions in Flash8 to manipulate strings? I need to replace all instances of "/descr" with "actionscript.. but.. some instances of "want to change those if possible. thanks for any insights. -Boyd ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] regular expressions in Flash8?
>>can we now use regularexpressions in Flash8 to manipulate strings? Yes, there are some regular expression classes floating out there for AS2/pre-Flash 9 people, have you googled those? Sorry I can't be more help than that. Jason Merrill Bank of America GT&O Learning & Leadership Development eTools & Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] regular expressions in Flash8?
BS> can we now use regularexpressions in Flash8 to manipulate strings? Some libraries for handling regular expressions are out there (Google?), but Flash 8 has no built-in support for regex. BS> I need to replace all instances of "/descr" with " actionscript.. but.. some instances of " I do not want to change those if possible. thanks for any BS> insights. It doesn't require regular expressions: ouptutStr = inputStr.split("http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Regular Expressions
Regex supports lazy matching as well using the '?' option on pretty much any quantifier. Scott On 24/08/06, neo binedell <[EMAIL PROTECTED]> wrote: RegEx performs greedy searches, so it would find a first and move past it, which would break the second pattern as it would just be "b". In general you want to order your expressions from longer matching to shorter if one contains the other. Just think of it as gobbling up patterns before other patterns get a look at it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Miguel Serrano Sent: 23 August 2006 06:25 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Regular Expressions Hi list! I don't understand one issue of RegExp framework: the illustrative example: var pattern:RegExp = /(a)|(ab)/ pattern.exec("nnnabnnn"); trace (result[0]) // output a pattern = /(ab)|(a)/ pattern.exec("nnnabnnn"); trace (result[0]) // output ab Why this behaviour? shouldn't RegExp return the longest pattern founded in the string?. Calling exec several times with first expression never return "ab" It's supossed that conditional operator "|" is conmutative. Any idea? thank you! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Regular Expressions
RegEx performs greedy searches, so it would find a first and move past it, which would break the second pattern as it would just be "b". In general you want to order your expressions from longer matching to shorter if one contains the other. Just think of it as gobbling up patterns before other patterns get a look at it. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Miguel Serrano Sent: 23 August 2006 06:25 PM To: flashcoders@chattyfig.figleaf.com Subject: [Flashcoders] Regular Expressions Hi list! I don't understand one issue of RegExp framework: the illustrative example: var pattern:RegExp = /(a)|(ab)/ pattern.exec("nnnabnnn"); trace (result[0]) // output a pattern = /(ab)|(a)/ pattern.exec("nnnabnnn"); trace (result[0]) // output ab Why this behaviour? shouldn't RegExp return the longest pattern founded in the string?. Calling exec several times with first expression never return "ab" It's supossed that conditional operator "|" is conmutative. Any idea? thank you! ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Regular Expressions
http://www.regular-expressions.info/tutorial.html This is the best RegEx tutorial I've seen out there. It's comprehensive and every lesson builds on the last. By the time you get through it, you'll be a RegExpert! :) ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com