>// replace /descr with </descr
>txt = txt.split('/descr').join('</descr');

Then


// replace <</descr with </descr
txt = txt.split('<</descr').join('</descr');


-Keith 
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: [email protected]
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 </descr";

// replace </descr with /descr
txt = txt.split('</descr').join('/descr');

// replace /descr with </descr
txt = txt.split('/descr').join('</descr');

- juan


On May 18, 2007, at 11:50 AM, BOYD SPEER wrote:

> can we now use regularexpressions in Flash8 to manipulate strings?
>
> I need to replace all instances of "/descr" with "</descr" using  
> actionscript..
>        but.. some instances of "</descr" already exist and I do not  
> want to change those if possible. thanks for any insights.
>
> -Boyd
> _______________________________________________
> [email protected]
> 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

_______________________________________________
[email protected]
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

_______________________________________________
[email protected]
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

Reply via email to