Develop
2013.04.23 16:20
[vb] 문자열에서 태그 제거함수 (Visual Basic)
조회 수 22671 댓글 0
첨부 '1' |
|
---|
스샷 먼저.. ㅎㅎ
Function DelTag(mystr As Variant) As String '태그제거 함수 If IsNull(mystr) = True Then 'Null 처리부분 DelTag = "" Exit Function End If Dim Pointed_Char As String Dim Switch_Value As Boolean Dim Result As String Dim Pnt_of_Str As Integer Switch_Value = True For Pnt_of_Str = 1 To Len(mystr) '전체 글자 갯수 만큼 루프를 수행 Pointed_Char = Mid(mystr, Pnt_of_Str, 1) '한글자씩 처리한다 If Pointed_Char = "<" Then If (Asc(Mid(mystr, Pnt_of_Str + 1, 1)) >= 65 And Asc(Mid(mystr, Pnt_of_Str + 1, 1)) <= 122) Or _ Mid(mystr, Pnt_of_Str + 1, 1) = "/" Then '첫번째 글자가 영문 알파벳 이거나 "/"이면 스위치는 false Switch_Value = False End If If (Asc(Mid(mystr, Pnt_of_Str + 2, 1)) >= 65 And Asc(Mid(mystr, Pnt_of_Str + 2, 1)) <= 122) Or _ Mid(mystr, Pnt_of_Str + 2, 1) = "/" Then '두번째 글자가 영문 알파벳 이거나 "/"이면 스위치는 false Switch_Value = False End If End If If Switch_Value = True Then '스위치 값이 true일때만 result에 문자를 더해나간다 Result = Result & Pointed_Char End If If Pointed_Char = ">" Then '닫히는 꺽쇄 괄호를 만나면 무조건 스위치값은 true Switch_Value = True End If Next Pnt_of_Str DelTag = Result End Function
[출처] http://blog.naver.com/devace?Redirect=Log&logNo=20063206854
번호 | 분류 | 제목 | 글쓴이 | 날짜 | 조회 수 |
---|---|---|---|---|---|
457 | Develop |
[c#] MS IE(Internet Explorer) 툴바 버튼 예제 2003/2005 두가지 버전
![]() |
hooni | 2013.04.23 | 2090 |
456 | Develop |
[c] 네트워크 트래릭 모니터링.. 졸업작품..
2 ![]() |
hooni | 2013.04.23 | 11062 |
455 | Develop |
[c] 텍스트 파일(로그)을 정해진 라인 단위로 쪼개주는 코드
![]() |
hooni | 2013.04.23 | 7056 |
454 | Develop |
[c#] mfc 기반의 웹서비스 서버/클라이언트 샘플과 예제 소스
![]() |
hooni | 2013.04.23 | 2073 |
453 | Develop | [c++] Win32API를 이용한 ExitWindowsEx 사용한 예제코드 | hooni | 2013.04.23 | 7985 |
452 | Develop |
[c#] BHO 한샘툴바랑 동현툴바..
![]() |
hooni | 2013.04.23 | 2208 |
451 | Develop | [c] 가변인자 함수(printf와 같은..) | hooni | 2013.04.23 | 7191 |
450 | Develop |
[c] openssl 샘플코드.. 어려움 ㅠㅠ
![]() |
hooni | 2013.04.23 | 7034 |
449 | Develop |
[c] 바로 보고 정리할 것.. ㅋㄷㅋㄷ
![]() |
hooni | 2013.04.23 | 7147 |
448 | Develop |
[c] UTF-8을 EUC-KR로 변환.. (iconv)
![]() |
hooni | 2013.04.23 | 20175 |
447 | Develop |
[c] 도메인(호스트)으로 IP정보 알아오기.. (nslookup과 비슷)
![]() |
hooni | 2013.04.23 | 6941 |
446 | Develop |
[c] 파이프(popen)로 다른 프로세스 실행결과 가져오기
![]() |
hooni | 2013.04.23 | 8410 |