Not tested, but should be what you want

            var s : String = ",AA,BB,CC,DD";
            var regex : RegExp = /^\s*,/;
            s = s.replace(regex,"");

-J

On Wed, May 14, 2008 at 3:34 AM, Alex Harui <[EMAIL PROTECTED]> wrote:

>    What code did you use?  A regular string replace should just replace
> the first match.
>
>
>  ------------------------------
>
> *From:* [email protected] [mailto:[EMAIL PROTECTED] *On
> Behalf Of *Tom Preet
> *Sent:* Tuesday, May 13, 2008 8:22 AM
> *To:* [email protected]
> *Subject:* [flexcoders] String Replace
>
>
>
> Hi,
>
> In my application am using remote object method for retrieving data from
> Java class.
> in the ResultEvent am storing the values in String.
>
> But the data from the java was displa,ying as
> ,aa,bb,cc,dd
> ,AA,BB,CC,DD
> ,ab,bc,bd  .....
>
> But, comma(,) Symbol is displaying before the starting of each and every
> line.
>
> For this I have used the String replacement where as comma(,) is replacing
> by blankspace.
> But, here each and every time  comma(,) is replacing by space.
>
> I need to replace the first position instead of all the commas(,) in the
> string.
>
> can anyone help me how to achieve this.
>
> Thanks,
> Tomt.
>
>
>    
>



-- 
"Therefore, send not to know For whom the bell tolls. It tolls for thee."

:: Josh 'G-Funk' McDonald
:: 0437 221 380 :: [EMAIL PROTECTED]

Reply via email to