본문 바로가기

프로그래밍

PHP 정규표현식 Example.1

반응형
<?php

$handle = @fopen("data.txt", "r");
if ($handle) {
    while (!feof($handle)) {
        $buffer = fgets($handle, 4096);

        preg_match("/Results.*?<\/b> for/",$buffer, $matches);
        //print_r($matches);
        echo $matches[0];

    }
    fclose($handle);
}
?>
반응형

'프로그래밍' 카테고리의 다른 글

C#시작을 위한 환경구축  (0) 2009.09.03
Session variables without cookies  (0) 2009.09.03
Jquery ShowHide 테이블 Row  (0) 2009.08.29
MySQL의 DateFormet  (0) 2009.08.27
Template 언더바 설치! 디렉토리구조 및 설정하기  (0) 2009.08.26