3 Replies Latest reply on Nov 28, 2011 6:03 AM by flexprabu

    can't remove "\" symbol in string replace.

    flexprabu Level 1

      Hi all,

              i cant remove this type of string replace.

      XML


      <Rectangle name=\"rect\" BGcolor=\"16777215\" x=\"139\" y=\"107\" width=\"103\" height=\"80\"/>

       

      i want to remove" \" this symbol .And am using this type of string replace code.

       

      public function onResult(event:ResultEvent):void

                           {

                          

                                        var str:String=(event.result.toString());

                                        var tmp:String='=\.';

                                       var regExp:RegExp=new RegExp(tmp,'ig');

                                       str=str.replace(regExp,'=');

       

                                  var subStr:String=str;

                                              var tmp2:String='\"';

                                              var regExp2:RegExp=new RegExp(tmp2,'ig');

                                              subStr=subStr.replace(regExp2,'"');

                                              Alert.show(subStr);

                           }