我试图采取文本字符串,并从它创建一个数组,这样的字符串:分手字符串转换成文本/ HTTP链接
var someText='I am some text and check this out! http://blah.tld/foo/bar Oh yeah! look at this too: http://foobar.baz';
此处插入神奇的正则表达式和
数组应该是这样的:
theArray[0]='I am some text and check this out! '
theArray[1]='http://blah.tld/foo/bar'
theArray[2]=' Oh yeah! look at this too: '
theArray[3]='http://foobar.baz'
我不知所措,任何帮助将大大理解
--Er IC
您的意思是说每次找到URL时应该拆分字符串? – kiamlaluno 2010-07-15 03:35:32
我知道这个字符串,我需要将它分解并重新放回去,一遍又一遍地翻过来, – Eric 2010-07-15 03:48:14