<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>
댓글 1개
15년 전
preg_match("#<td class=\"view_ditail\"[^>]+\>(.*)</td></tr><tr><td>#is", $str, $matches);
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>
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>
게시판 목록
프로그램
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 30 |
아우겐나이스
|
21년 전 | 4041 | |
| 29 |
아우겐나이스
|
21년 전 | 4431 | |
| 28 |
아우겐나이스
|
21년 전 | 3455 | |
| 27 | 21년 전 | 5821 | ||
| 26 | 21년 전 | 3092 | ||
| 25 | 21년 전 | 6071 | ||
| 24 | 18년 전 | 3642 | ||
| 23 | 21년 전 | 3629 | ||
| 22 | 21년 전 | 4240 | ||
| 21 | 21년 전 | 3812 | ||
| 20 | 21년 전 | 4213 | ||
| 19 | 21년 전 | 6672 | ||
| 18 | 21년 전 | 4731 | ||
| 17 | 21년 전 | 6980 | ||
| 16 | 21년 전 | 4165 | ||
| 15 | 21년 전 | 2621 | ||
| 14 | 21년 전 | 4963 | ||
| 13 | 21년 전 | 3395 | ||
| 12 |
Recluse
|
21년 전 | 3868 | |
| 11 |
아우겐나이스
|
21년 전 | 3564 | |
| 10 |
Recluse
|
21년 전 | 3388 | |
| 9 | 21년 전 | 3975 | ||
| 8 | 21년 전 | 5156 | ||
| 7 | 21년 전 | 4753 | ||
| 6 | 21년 전 | 5671 | ||
| 5 | 21년 전 | 4107 | ||
| 4 | 21년 전 | 4826 | ||
| 3 | 21년 전 | 4735 | ||
| 2 | 21년 전 | 3232 | ||
| 1 | 22년 전 | 4334 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기