DAIC 当前离线
中将
aaa: hello world bbb: welcome ccc: bye bye复制代码
TOP
broly (Broly)当前离线
版主
var stra,strb; stra = "aaa: hello\nworld\nbbb: welcome\nccc: bye bye"; WScript.Echo(stra); strb = stra.substr(stra.indexOf("bbb:"),stra.indexOf("ccc:")-stra.indexOf("bbb:")); WScript.Echo(strb)复制代码
wc726842270 (枫中残雪)当前离线
大校
var stra,strb; stra = "aaa: hello\nworld\nbbb: welcome\nccc: bye bye"; var strs = new Array(); strs = stra.split("\n") for (i = 0;i < strs.length;i++) { if (strs[i].substr(0,4) =="bbb:") { strb = strs[i] } } WScript.Echo(strb)复制代码