回答編集履歴
1
表現変更
answer
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
以下のコードでどうでしょうか?
|
2
2
|
```javascript
|
3
|
-
s.match(/<(script|object)[\s\S]*<\/\1>/)
|
3
|
+
s.match(/<(script|object)[\s\S]*?<\/\1>/)
|
4
4
|
```
|
5
|
+
.(ドット)ではなく、[\s\S]にすれば良いようです。
|
5
6
|
[参考にしたページ](https://os0x.g.hatena.ne.jp/os0x/20080213/1202900650)
|