此時,RegExp的lastIndex屬性一直是0。 demo: 複製程式碼程式碼如下: var s = 'this is a string'; var p = /\b\w*(i)s\b/; var rm = s.match(p);
確定! 回上一頁