回答編集履歴

1

表現変更

2015/12/07 10:18

投稿

hirohiro
hirohiro

スコア2068

test CHANGED
@@ -2,8 +2,10 @@
2
2
 
3
3
  ```javascript
4
4
 
5
- s.match(/<(script|object)[\s\S]*<\/\1>/)
5
+ s.match(/<(script|object)[\s\S]*?<\/\1>/)
6
6
 
7
7
  ```
8
8
 
9
+ .(ドット)ではなく、[\s\S]にすれば良いようです。
10
+
9
11
  [参考にしたページ](https://os0x.g.hatena.ne.jp/os0x/20080213/1202900650)