[펌] 정규식을 사용하여 특정태그에서 텍스트만 불러오고 싶습니다...ㅜㅜ
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="view_ditail" id="contents_td" style='overflow-x:auto; word-break:break-all;'>
<TABLE width="100%" border=0> <TBODY> <TR> <TD class=board_write_table_style colSpan=10> <TABLE id=tbBoardView style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=board_read_textarea_cell_style vAlign=top colSpan=2 height=200><SPAN class=board_comment_text id=textContent> 학원명 : 참사랑내신스쿨</FONT></P> </FONT> </P> 모 집 : 초, 중 영어선생님</FONT></P> 초, 중 수학선생님</FONT></P> 전임선생님 및 보조선생님</FONT></P> </FONT> </P> 보 수 : 전임 - 140이상</FONT></P> 보조 - 타임당 20~30정도</FONT></P> </FONT> </P> 근 무 : 6개월이상가능자</FONT></P> </FONT> </P> 연락처 : 011 xxx 8217</FONT></P></SPAN></TD> <TD class=board_read_content_cell_style><INPUT id=fileName type=hidden name=fileName></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD> <TABLE width="100%" border=0> <TBODY> <TR> <TD> <TABLE id=tbComment style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> </P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD></TD></TR>
</td>
</tr>
<tr>
<td class="tr_line"> </td>
</tr>
</table
-------------------------------------------------------------------------------------------------------------------------------
우선 이 안에 있는 텍스트 값만 불러 오고 싶습니다.
조건은... <td class="view_ditail" 이 td 안에 있는 텍스트를 불러오는식으로 하려고합니다..
td 안에 또다른 많은 태그들이 있는데 어떤 정규식으로 풀어야할지 고민입니다.
답변 부탁드릴께요...<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 18:00:23 Regular Expression (정규표현식)에서 이동 됨]</div>
<tr>
<td class="view_ditail" id="contents_td" style='overflow-x:auto; word-break:break-all;'>
<TABLE width="100%" border=0> <TBODY> <TR> <TD class=board_write_table_style colSpan=10> <TABLE id=tbBoardView style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=board_read_textarea_cell_style vAlign=top colSpan=2 height=200><SPAN class=board_comment_text id=textContent> 학원명 : 참사랑내신스쿨</FONT></P> </FONT> </P> 모 집 : 초, 중 영어선생님</FONT></P> 초, 중 수학선생님</FONT></P> 전임선생님 및 보조선생님</FONT></P> </FONT> </P> 보 수 : 전임 - 140이상</FONT></P> 보조 - 타임당 20~30정도</FONT></P> </FONT> </P> 근 무 : 6개월이상가능자</FONT></P> </FONT> </P> 연락처 : 011 xxx 8217</FONT></P></SPAN></TD> <TD class=board_read_content_cell_style><INPUT id=fileName type=hidden name=fileName></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD> <TABLE width="100%" border=0> <TBODY> <TR> <TD> <TABLE id=tbComment style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> </P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD></TD></TR>
</td>
</tr>
<tr>
<td class="tr_line"> </td>
</tr>
</table
-------------------------------------------------------------------------------------------------------------------------------
우선 이 안에 있는 텍스트 값만 불러 오고 싶습니다.
조건은... <td class="view_ditail" 이 td 안에 있는 텍스트를 불러오는식으로 하려고합니다..
td 안에 또다른 많은 태그들이 있는데 어떤 정규식으로 풀어야할지 고민입니다.
답변 부탁드릴께요...<div class='small'>[이 게시물은 관리자님에 의해 2011-10-31 18:00:23 Regular Expression (정규표현식)에서 이동 됨]</div>
|
댓글을 작성하시려면 로그인이 필요합니다.
프로그램
태그 필터 (최대 3개)
전체
개발자
소스
기타
mysql
팁자료실
javascript
php
linux
flash
정규표현식
jquery
node.js
mobile
웹서버
os
프로그램
강좌
썸네일
이미지관련
도로명주소
그누보드5
기획자
견적서
계약서
기획서
마케팅
제안서
seo
통계
서식
통계자료
퍼블리셔
html
css
반응형
웹접근성
퍼블리싱
표준화
반응형웹
홈페이지기초
부트스트랩
angularjs
포럼
스크린리더
센스리더
개발자톡
개발자팁
퍼블리셔톡
퍼블리셔팁
기획자톡
기획자팁
프로그램강좌
퍼블리싱강좌
댓글 1개
echo trim($matches[1]);
결과 :
<TABLE width="100%" border=0> <TBODY> <TR> <TD class=board_write_table_style colSpan=10> <TABLE id=tbBoardView style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD class=board_read_textarea_cell_style vAlign=top colSpan=2 height=200><SPAN class=board_comment_text id=textContent> 학원명 : 참사랑내신스쿨</FONT></P> </FONT> </P> 모 집 : 초, 중 영어선생님</FONT></P> 초, 중 수학선생님</FONT></P> 전임선생님 및 보조선생님</FONT></P> </FONT> </P> 보 수 : 전임 - 140이상</FONT></P> 보조 - 타임당 20~30정도</FONT></P> </FONT> </P> 근 무 : 6개월이상가능자</FONT></P> </FONT> </P> 연락처 : 011 xxx 8217</FONT></P></SPAN></TD> <TD class=board_read_content_cell_style><INPUT id=fileName type=hidden name=fileName></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR><TR><TD> <TABLE width="100%" border=0> <TBODY> <TR> <TD> <TABLE id=tbComment style="BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width="100%" border=0> <TBODY> <TR> <TD> </P></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>