테스트 사이트 - 개발 중인 베타 버전입니다

[펌] 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);

이런 코드가 아닐까요?

게시글 목록

번호 제목
13686
13683
21003
13680
25150
25143
20981
13679
13678
13677
13675
13674
29483
13672
13671
13670
13669
29482
13668
13666
29481
29480
13665
13664
13663
13662
13661
25124
25116
20970
13660
JavaScript adsc
13658
29479
13655
13650
13648
13647
13646
29478
13645
PHP 3.0
13643
13642
13640
13637
13636
13635
13634
29476
13633
13632
13630
29473
13624
13620
13582
13556
29472
29471
13555
13554
13553
13552
13551
13550
13546
13545
13544
29470
13541
13540
13538
13535
29466
13533
29463
13532
13531
13529
29462
13528
29459
29458
13527
13526
13525
13523
13522
13512
13510
13507
13498
29452
13492
13487
29450
13480
13474
13460
13457
29447