리자

[펌] preg_replace 로 게시물 스타일 태그 제거

preg_replace 로 게시물 스타일시트를 제거 하려고 합니다.
아래와 같이 처리 하면 잘 처리 되어는데요.
$content = preg_replace("!<style(.*?)<\/style>!is", '', $content);
아래의 스타일 처럼 들어가면 적용이 안되네요
답변 부탁 합니다.


== 문제의 스타일 ======================================
<STYLE> body {background-image:url(http://blogfiles7.naver.net/data17/2006/7/4/102/5_1147903815-coco767.gif); background-attachment: fixed; background-repeat: repeat; background-position: bottom right;} table { background-color: transparent
; } td { background-color: transparent; }<STYLE>
=====================================================<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 18:00:23 Regular Expression (정규표현식)에서 이동 됨]</div>
|

댓글 1개

$content = preg_replace("/<style[^<]*</is", "", $content);

이런 코드가 아닐까요?
$content = preg_replace("/<style[^<]*</is", "", $content);

이런 코드가 아닐까요?
댓글을 작성하시려면 로그인이 필요합니다.

프로그램

8,188건
+
제목 글쓴이 날짜 조회
12-01-11 조회 2,746
12-01-11 조회 1.2만
12-01-10 조회 2,846
12-01-08 조회 3,440
12-01-05 조회 5,333
11-12-29 조회 3,049
11-12-27 조회 2,834
11-12-25 조회 3,017
11-12-22 조회 3,454
11-12-14 조회 2,916
11-12-12 조회 3,534
11-11-28 조회 3,375
10-10-19 조회 2,834
08-09-05 조회 3,755
08-09-05 조회 3,569
08-06-14 조회 3,314
08-04-22 조회 3,590
08-04-17 조회 3,594
07-10-03 조회 4,210
07-10-03 조회 3,605
07-10-03 조회 7,286
07-10-03 조회 4,564
07-10-03 조회 3,262
07-10-03 조회 2,853
07-10-02 조회 3,569
07-10-02 조회 3,099
07-09-27 조회 5,017
07-09-27 조회 3,843
06-09-26 조회 3,514
06-09-26 조회 4,731
06-09-22 조회 3,905
06-09-22 조회 3,521
06-09-22 조회 4,268
06-09-21 조회 4,201
06-08-18 조회 3,692
05-11-30 조회 4,740
05-07-15 조회 4,587
05-03-23 조회 4,651
05-03-14 조회 3,319
05-03-13 조회 2,695
04-08-05 조회 5,767