Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 删除一些特殊字符“;[……”是;一串_Actionscript 3_Apache Flex - Fatal编程技术网

Actionscript 3 删除一些特殊字符“;[……”是;一串

Actionscript 3 删除一些特殊字符“;[……”是;一串,actionscript-3,apache-flex,Actionscript 3,Apache Flex,我不熟悉flex编码,例如,如果我有一个字符串,如“[123-456],[456-789]” 我想删除所有“[”和“]”,这会导致: “123-456456-789” string.replace()或trim()能帮我完成这项工作吗? 在这种情况下,尝试了几次仍然失败。string.replace()应该可以完成这项工作! 请看 另见 var st: String = "[123-456],[456-789]"; var p1: RegExp = /\[|\]/g; st = st

我不熟悉flex编码,例如,如果我有一个字符串,如“[123-456],[456-789]” 我想删除所有“[”和“]”,这会导致:

“123-456456-789”

string.replace()或trim()能帮我完成这项工作吗?
在这种情况下,尝试了几次仍然失败。string.replace()应该可以完成这项工作! 请看

另见
  var st: String = "[123-456],[456-789]";
  var p1: RegExp = /\[|\]/g;
  st = st.replace(p1, "");
  trace(st) //"123-456,456-789"