以下代码:
Response.Write(string.Format("data: {0}\n\n", "third"));
Response.Flush();
输出:
var re = /^[A-Za-z_][A-Za-z0-9_]*$/g;
console.log('1', re.test('_1Test_TEST'));
console.log('2', re.test('test'));
console.log('3', re.test('test'));
console.log('4', /^[A-Za-z_][A-Za-z0-9_]*$/g.test('_1Test_TEST'));
console.log('5', /^[A-Za-z_][A-Za-z0-9_]*$/g.test('test'));
console.log('6', /^[A-Za-z_][A-Za-z0-9_]*$/g.test('test'));
为什么案例2失败(案例3,5& 6正在通过)?
在节点4.2和6.2中尝试