1
我可以使用正則表達式的字符編碼...嗎?我可以使用正則表達式的字符編碼嗎?
例如
this.html().replace(/<\/?[^>]+>/gi, '')
相反的:
this.html().replace(/<\/?[^>]+>/gi, '')
我可以使用正則表達式的字符編碼...嗎?我可以使用正則表達式的字符編碼嗎?
例如
this.html().replace(/<\/?[^>]+>/gi, '')
相反的:
this.html().replace(/<\/?[^>]+>/gi, '')
定義 「使用」 ..
裏面字面正則表達式,<
永遠不會翻譯或考慮同<
。這並不意味着你不能在你的表達中使用它,它只是意味着你會匹配<
而不是<
var x = "<html>";
x.match('<[^>]+>'); // => <html>
x.match('<[^>]+>'); // => null