Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- wsl2 우분투에 docker 설치
- mysqldump: Got error: 1045
- javascript
- bootstrap modal
- 유튜브 플레이 리스트 저장
- mariadb upgrade
- (using password: YES)" when trying to connect
- usb efi 시스템 파티션 삭제
- group_concat 구분자
- html pdf 변환
- httpd.conf 보안 설정
- apple push notification service (apns) is changing
- PHP 정규식 예제
- 아파치 웹 서버의 정보 숨기기
- PHP 구글 OTP 연동
- 숫자 3자리(천단위) 마다 콤마 찍기
- 파라미터 & 오류
- 윈도우 환경 아파치 mod_security2 설치
- sha-2 root
- php 이미지 url 검증 함수
- 비밀번호검증정규식
- thumbnail 클래스
- 윈도우 mod_security2
- 자바스크립트비밀번호검증
- 비밀번호정규식
- postfix 설치
- php 배열제거
- mod_security2 설치
- modsecurity 설치
- bootstrap
Archives
- Today
- Total
투덜이 개발자
HTML 페이지에서 주석을 제거하는 정규식(PHP) 본문
반응형
/* */주석
$str = preg_replace('/\/\*(.*?)\*\//is', '', $str);
<!-- -->주석
$str = preg_replace('/<!--(.*?)-->/is', '', $str);
//주석
$str = preg_replace('/\/\/(.*)\n', '', $str);
#주석
$str = preg_replace('/#(.*)\n/', '', $str);
'주석
$str = preg_replace('/\'(.*)\n/', '', $str);
https://openlife.tistory.com/378
HTML 페이지에서 주석을 제거하는 정규식(PHP)
/* */주석 $str = preg_replace('/\/\*(.*?)\*\//is', '', $str); 주석 $str = preg_replace('//is', '', $str); //주석 $str = preg_replace('/\/\/(.*)\n', '', $str); #주석 $str = preg_replace('/#(.*)\n/', '', $str); '주석 $str = preg_replace('/\'(.*)\n/
openlife.tistory.com
반응형
'Program Language > PHP' 카테고리의 다른 글
우분투 composer 설치 (1) | 2024.09.27 |
---|---|
[PHP] 파라미터 & 오류 (0) | 2024.05.27 |
[PHP] 엑셀 셀안에서 줄바꿈 처리 (0) | 2024.05.10 |
PHP 정규식 예제 (0) | 2024.04.16 |
[PHP] 구글 OTP 연동 (0) | 2024.03.20 |