사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20071011 할머니네서...  (0) 2007.10.11
20071009 강이가 병원에 오는 이유  (0) 2007.10.09
20071006 폰사진  (0) 2007.10.06
20071004 할머니등의 수  (0) 2007.10.04
20070928 폰사진  (0) 2007.09.28

이건 누가 찍은거엿....

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20071009 강이가 병원에 오는 이유  (0) 2007.10.09
20071008 병원에서 엄마랑 강이랑  (0) 2007.10.08
20071004 할머니등의 수  (0) 2007.10.04
20070928 폰사진  (0) 2007.09.28
20070913 폰사진  (0) 2007.09.13
대한민국 노무현 대통령과 조선민주주의인민공화국 김정일 국방위원장 사이의 합의에 따라 노무현 대통령이 2007년 10월 2일부터 4일까지 평양을 방문하였다. 방문기간중 역사적인 상봉과 회담들이 있었다. 상봉과 회담에서는 6.15 공동선언의 정신을 재확인하고 남북관계발전과 한반도 평화, 민족공동의 번영과 통일을 실현하는데 따른 제반 문제들을 허심탄회하게 협의하였다. 쌍방은 우리민족끼리 뜻과 힘을 합치면 민족번영의 시대, 자주통일의 새시대를 열어 나갈수 있다는 확신을 표명하면서 6.15 공동선언에 기초하여 남북관계를 확대.발전시켜 나가기 위하여 다음과 같이 선언한다.

1. 남과 북은 6.15 공동선언을 고수하고 적극 구현해 나간다. 남과 북은 우리민족끼리 정신에 따라 통일문제를 자주적으로 해결해 나가며 민족의 존엄과 이익을 중시하고 모든 것을 이에 지향시켜 나가기로 하였다. 남과 북은 6.15 공동선언을 변함없이 이행해 나가려는 의지를 반영하여 6월 15일을 기념하는 방안을 강구하기로 하였다.

2. 남과 북은 사상과 제도의 차이를 초월하여 남북관계를 상호존중과 신뢰 관계로 확고히 전환시켜 나가기로 하였다. 남과 북은 내부문제에 간섭하지 않으며 남북관계 문제들을 화해와 협력, 통일에 부합되게 해결해 나가기로 하였다. 남과 북은 남북관계를 통일 지향적으로 발전시켜 나가기 위하여 각기 법률적·제도적 장치들을 정비해 나가기로 하였다. 남과 북은 남북관계 확대와 발전을 위한 문제들을 민족의 염원에 맞게 해결하기 위해 양측 의회 등 각 분야의 대화와 접촉을 적극 추진해 나가기로 하였다.

3. 남과 북은 군사적 적대관계를 종식시키고 한반도에서 긴장완화와 평화를 보장하기 위해 긴밀히 협력하기로 하였다. 남과 북은 서로 적대시하지 않고 군사적 긴장을 완화하며 분쟁문제들을 대화와 협상을 통하여 해결하기로 하였다. 남과 북은 한반도에서 어떤 전쟁도 반대하며 불가침의무를 확고히 준수하기로 하였다. 남과 북은 서해에서의 우발적 충돌방지를 위해 공동어로수역을 지정하고 이 수역을 평화수역으로 만들기 위한 방안과 각종 협력사업에 대한 군사적 보장조치 문제 등 군사적 신뢰구축조치를 협의하기 위하여 남측 국방부 장관과 북측 인민무력부 부장간 회담을 금년 11월중에 평양에서 개최하기로 하였다.

4. 남과 북은 현 정전체제를 종식시키고 항구적인 평화체제를 구축해 나가야 한다는데 인식을 같이하고 직접 관련된 3자 또는 4자 정상들이 한반도지역에서 만나 종전을 선언하는 문제를 추진하기 위해 협력해 나가기로 하였다. 남과 북은 한반도 핵문제 해결을 위해 6자회담 ‘9.19 공동성명’과 ‘2.13 합의’가 순조롭게 이행되도록 공동으로 노력하기로 하였다.

5. 남과 북은 민족경제의 균형적 발전과 공동의 번영을 위해 경제협력사업을 공리공영과 유무상통의 원칙에서 적극 활성화하고 지속적으로 확대 발전시켜 나가기로 하였다. 남과 북은 경제협력을 위한 투자를 장려하고 기반시설 확충과 자원개발을 적극 추진하며 민족내부협력사업의 특수성에 맞게 각종 우대조건과 특혜를 우선적으로 부여하기로 하였다. 남과 북은 해주지역과 주변해역을 포괄하는 ‘서해평화협력특별지대’를 설치하고 공동어로구역과 평화수역 설정, 경제특구건설과 해주항 활용, 민간선박의 해주직항로 통과, 한강하구 공동이용 등을 적극 추진해 나가기로 하였다. 남과 북은 개성공업지구 1단계 건설을 빠른 시일안에 완공하고 2단계 개발에 착수하며 문산-봉동간 철도화물수송을 시작하고, 통행·통신·통관 문제를 비롯한 제반 제도적 보장조치들을 조속히 완비해 나가기로 하였다. 남과 북은 개성-신의주 철도와 개성-평양 고속도로를 공동으로 이용하기 위해 개보수 문제를 협의·추진해 가기로 하였다. 남과 북은 안변과 남포에 조선협력단지를 건설하며 농업, 보건의료, 환경보호 등 여러 분야에서의 협력사업을 진행해 나가기로 하였다. 남과 북은 남북 경제협력사업의 원활한 추진을 위해 현재의 ‘남북경제협력추진위원회’를 부총리급 ‘남북경제협력공동위원회’로 격상하기로 하였다.

6. 남과 북은 민족의 유구한 역사와 우수한 문화를 빛내기 위해 역사, 언어, 교육, 과학기술, 문화예술, 체육 등 사회문화 분야의 교류와 협력을 발전시켜 나가기로 하였다. 남과 북은 백두산관광을 실시하며 이를 위해 백두산-서울 직항로를 개설하기로 하였다. 남과 북은 2008년 북경 올림픽경기대회에 남북응원단이 경의선 열차를 처음으로 이용하여 참가하기로 하였다.

7. 남과 북은 인도주의 협력사업을 적극 추진해 나가기로 하였다. 남과 북은 흩어진 가족과 친척들의 상봉을 확대하며 영상 편지 교환사업을 추진하기로 하였다. 이를 위해 금강산면회소가 완공되는데 따라 쌍방 대표를 상주시키고 흩어진 가족과 친척의 상봉을 상시적으로 진행 하기로 하였다. 남과 북은 자연재해를 비롯하여 재난이 발생하는 경우 동포애와 인도주의, 상부상조의 원칙에 따라 적극 협력해 나가기로 하였다.

8. 남과 북은 국제무대에서 민족의 이익과 해외 동포들의 권리와 이익을 위한 협력을 강화해 나가기로 하였다 남과 북은 이 선언의 이행을 위하여 남북총리회담을 개최하기로 하고, 제 1차회의를 금년 11월중 서울에서 갖기로 하였다. 남과 북은 남북관계 발전을 위해 정상들이 수시로 만나 현안 문제들을 협의하기로 하였다.

2007년 10월 4일

평 양

대 한 민 국 대 통 령 노 무 현

조선민주주의인민공화국 국 방 위 원 장 김 정 일


===================================================================

12년전의 열정도, 노래도 모두 희미해져 가지만...
그래도 세상은 점점 변하고 있다.
이제는 지켜보는것 밖에는 아무것도 할수 없지만...

그저 묵묵히 내 자리에서 최선을 다하는것...
그리고 세상의 변화를 지켜보는것...

남아있는 바램이 있다면...
오래전 그들과 함께 웃으며 변하는 세상을 인하여 기뻐할수 있었으면 좋겠다...

'Talk About > News Clipping' 카테고리의 다른 글

틱장애 (Tic Disorder)  (0) 2008.08.25
감기?  (0) 2008.08.20
프랑스 고졸 자격 시험문제  (0) 2004.11.10
대한소아과학회 예방접종표  (0) 2004.11.09
KTF 현직 과장이 92만명 고객 정보 팔아넘겨  (1) 2004.10.14
할머니가 업어줬어요..
엄마는 아파서 병원에 있어요...이게 다 아빠때문이라네요...

사용자 삽입 이미지
사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20071008 병원에서 엄마랑 강이랑  (0) 2007.10.08
20071006 폰사진  (0) 2007.10.06
20070928 폰사진  (0) 2007.09.28
20070913 폰사진  (0) 2007.09.13
20070906 낮잠 삼남매  (0) 2007.09.06
사용자 삽입 이미지 사용자 삽입 이미지

Windows Server 2008 Release Candidate: System Requirements and Installation Documentation


Quick Details
Version: 3.0
Date Published: 9/24/2007
Language: English
Download Size: 44 KB - 95
*Download size depends on selected download components.


Overview

For important information you should know prior to deploying and using the Microsoft Windows Server 2008 operating system, including known issues, see readme.htm on this page. You should familiarize yourself with all of the known issues listed in that document prior to installing the software.

For late-breaking issues that you might need to address after installing this release candidate of the Windows Server 2008 operating system, see relnotes.htm on this page. Unless otherwise specified, these notes apply to all versions and editions of Windows Server 2008. The release notes file will be continuously updated until the next release is available and a new release notes document is published.



System Requirements

  • Supported Operating Systems: Longhorn (Windows Code Name)
Internet Explorer



Instructions

1. Click the Download button on this page to start the download.
2. Do one of the following:
a) To start the installation immediately, click Open or Run this program from its current location.
b) To copy the download to your computer for installation at a later time, click Save or Save this program to disk.


What Others Are Downloading

Others who downloaded Windows Server 2008 Release Candidate: System Requirements and Installation Documentation also downloaded:
  1. Windows Server 2008 RC0 Standard Edition
  2. Windows Web Server 2008 RC0
  3. Microsoft Virtual Server 2005 R2 SP1 - Enterprise Edition
  4. Windows Server 2008 RC0 Datacenter
  5. Microsoft Windows Server 2008 Beta 3 VHD (Full Installation)

'Source Storage > Programming' 카테고리의 다른 글

ASP Dictionary Object  (0) 2008.04.07
Microsoft Log Parser 2.2  (0) 2008.03.28
JavaScript String Object  (0) 2007.07.31
날이면 날마다 까먹는 정규식 구성요소 (RegExp)  (0) 2007.04.18
HTML 특수문자 코드표  (0) 2007.03.21

사용자 삽입 이미지


'Photo Album > Family' 카테고리의 다른 글

20071006 폰사진  (0) 2007.10.06
20071004 할머니등의 수  (0) 2007.10.04
20070913 폰사진  (0) 2007.09.13
20070906 낮잠 삼남매  (0) 2007.09.06
20070828 산이아빠 병원에 입원중~  (0) 2007.08.28
폰사진..아빠 병실에서... 아빠는 저 아래 내동댕이중...

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20071004 할머니등의 수  (0) 2007.10.04
20070928 폰사진  (0) 2007.09.28
20070906 낮잠 삼남매  (0) 2007.09.06
20070828 산이아빠 병원에 입원중~  (0) 2007.08.28
20070815 롯데월드에 다녀왔어요~  (0) 2007.08.15

사용자 삽입 이미지
낮잠을 자요... 다들 널부러져서 .. 난리도 아닙니다.

병원에 입원했습니다. 마이 아파요..
밥도 못먹구요.. 먹으면 다시 넘어와요...

사용자 삽입 이미지
블로그를 블로그답지 못하게 사용한지 어언 몇년.
게으름과 귀찮음에 보름에서 한달치 사진을 한큐에 올려버리고 나몰라라하는 생활
글을 적기보다는 금수강산 사진들이나 올려대고.

이건 내가 글쓰는 재주가 없기때문이기도 하지만 원초적 게으름앞에 무릎을 꿇었기 때문이겠지. 그래도 천만 다행인건 블로그에 글 올릴때 날짜를 임의로 설정할수 있어서 사진찍은 날짜를 등록시켜놨는데 이것땜시롱 더 게을러지는건지.

그렇게 생각을 하다보면 티스토리의 글쓰기 폼이 내 게으름내공을 더욱더 증진시켜주고 있는거기도 하고.

어제 밤에 중전이 사진좀 올려놓으라는 구박에 굽신거리며 사진을 등록시켜놓구선 오늘아침에 테터데스크를 설정해놨더니 이게 또 발목을 잡기 시작하네.

이거 업데이트가 느리면 바로 뽀록나게 생겼으니 어찌하면 좋단 말인가.

'Talk About > Dsus4’s Mind' 카테고리의 다른 글

다시 태어날 수 있다면...  (0) 2009.02.03
미안합니다. 여러분.  (0) 2008.05.26
정신없는 일상? 일상은 아니지...  (0) 2007.07.05
AweSome God  (0) 2007.05.08
CACAO 99%  (2) 2007.02.14
롯데월드에 다녀왔습니다.
몸이 힘듭니다... 더이상의 코멘트 대신 사진으로~
매우 많은 사진이 있습니다..

사용자 삽입 이미지

계속된 주말 출근 속에..이번엔 산이도 사무실로..갔다가...
좀 일찍 나오게 되었습니다.
소영집사님을 만나서 같이 교회로 가게 된 관계로 부천 중앙공원을 지나 소영집사님 동네에 도착해서..기둘리는중입니다.

사용자 삽입 이미지

중전이 피자가 땡긴다고 하셔서...피자헛에 갔습니다...

사용자 삽입 이미지

String 객체의 모든 메소드
Method Description FF N IE
anchor() Creates an HTML anchor 1 2 3
big() Displays a string in a big font 1 2 3
blink() Displays a blinking string 1 2  
bold() Displays a string in bold 1 2 3
charAt() Returns the character at a specified position 1 2 3
charCodeAt() Returns the Unicode of the character at a specified position 1 4 4
concat() Joins two or more strings 1 4 4
fixed() Displays a string as teletype text 1 2 3
fontcolor() Displays a string in a specified color 1 2 3
fontsize() Displays a string in a specified size 1 2 3
fromCharCode() Takes the specified Unicode values and returns a string 1 4 4
indexOf() Returns the position of the first occurrence of a specified string value in a string 1 2 3
italics() Displays a string in italic 1 2 3
lastIndexOf() Returns the position of the last occurrence of a specified string value, searching backwards from the specified position in a string 1 2 3
link() Displays a string as a hyperlink 1 2 3
match() Searches for a specified value in a string 1 4 4
replace() Replaces some characters with some other characters in a string 1 4 4
search() Searches a string for a specified value 1 4 4
slice() Extracts a part of a string and returns the extracted part in a new string 1 4 4
small() Displays a string in a small font 1 2 3
split() Splits a string into an array of strings 1 4 4
strike() Displays a string with a strikethrough 1 2 3
sub() Displays a string as subscript 1 2 3
substr() Extracts a specified number of characters in a string, from a start index 1 4 4
substring() Extracts the characters in a string between two specified indices 1 2 3
sup() Displays a string as superscript 1 2 3
toLowerCase() Displays a string in lowercase letters 1 2 3
toUpperCase() Displays a string in uppercase letters 1 2 3
toSource() Represents the source code of an object 1 4 -
valueOf() Returns the primitive value of a String object 1 2 4

String 객체의 모든 속성들
Property Description FF N IE
constructor A reference to the function that created the object 1 4 4
length Returns the number of characters in a string 1 2 3
prototype Allows you to add properties and methods to the object 1 2 4
간만에 다시 방문한 아웃백..
이제는 늘 먹는것만 딱 시켜먹고 나옵니다...
금액도 항상 나오는정도... 문제는 수가 자꾸 울어서...먹는둥 마는둥하고 포장해서 나옵니다..
뭐... 어쩌겠습니까...

사용자 삽입 이미지<div class=
사용자 삽입 이미지
사용자 삽입 이미지
토요일...강이와 사무실에 갔습니다.
그 형에 그 동생...맨날 보는게 그거니..강이도 ....
절대 개발자는 되지 말기를..

사용자 삽입 이미지

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070801 미스터 피자를 갔지요  (0) 2007.08.01
20070729 간만의 아웃백  (0) 2007.07.29
20070725 부천 GS스퀘어  (0) 2007.07.25
20070723 일상의 아침  (1) 2007.07.23
20070721 소아과 다녀오는길  (0) 2007.07.21
중전이 수를 데리고 사무실앞으로 방문해주셨습니다...
뭐 이래저래 일찍 나와서 저녁도 먹고 산이강이 민소매티셔츠도 하나씩 사고 했지요..
밥을 먹으러 가서는.. 3인분을 시켜 둘이 먹고 왔습니다...

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070729 간만의 아웃백  (0) 2007.07.29
20070728 김강 사무실을 방문하다.  (0) 2007.07.28
20070723 일상의 아침  (1) 2007.07.23
20070721 소아과 다녀오는길  (0) 2007.07.21
20070606 집에서~  (0) 2007.06.06
아침에 일어나서 출근전의 모습입니다.
산이는 아빠랑 같이 일어납니다.... 빨딱 일어나서...책도보고 TV도 보고 하지요..
강이는.... 물론 잡니다... 아침에 푹 주무시지요...가끔 장난기가 발동해서 흔들어봐도...
굳게 주무십니다....
수는 대중없죠...잘때도 있고 깨어있을때도 있고... 오늘은 아침부터 쌩쌩합니다..

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070728 김강 사무실을 방문하다.  (0) 2007.07.28
20070725 부천 GS스퀘어  (0) 2007.07.25
20070721 소아과 다녀오는길  (0) 2007.07.21
20070606 집에서~  (0) 2007.06.06
20070522 시체놀이  (0) 2007.05.22
강이가 기침을 해서 소아과에 다녀왔습니다.
의사선생님 말씀이 알러지가 있답니다.... 아토피란 말입죠...
"아빠를 닮아서 그렇다는" 산이엄마의 잔소리에 찍소리 못하고 있었습니다.

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070725 부천 GS스퀘어  (0) 2007.07.25
20070723 일상의 아침  (1) 2007.07.23
20070606 집에서~  (0) 2007.06.06
20070522 시체놀이  (0) 2007.05.22
20070520 주일 저녁  (0) 2007.05.20

오라클 정규식을 찾던중에 레퍼런스 페이지에서 발견~
10g부터 지원이 된다하니.... 9i까지는 삽질의 세계로~

Writing Better SQL Using Regular Expressions

By Alice Rischert

The regular expressions feature in Oracle Database 10g is a powerful tool for manipulating textual data

A new feature of Oracle Database 10g vastly improves your ability to search and manipulate character data. This feature, regular expressions, is a notation for describing textual patterns. It has long been available in many programming languages and a number of UNIX utilities.

Oracle's implementation of regular expressions comes in the form of various SQL functions and a WHERE clause operator. If you are unfamiliar with regular expressions, this article can give you a glimpse into this new and extremely powerful yet seemingly cryptic capability. Readers already familiar with regular expressions can gain an understanding of how to apply this functionality within the context of the Oracle SQL language.

What Is a Regular Expression?

A regular expression comprises one or more character literals and/or metacharacters. In its simplest format, a regular expression can consist only of character literals, such as the regular expression cat. It is read as the letter c followed by the letters a and t and this pattern matches strings such as cat, location, and catalog. Metacharacters provide algorithms that specify how Oracle should process the characters that make up a regular expression. When you understand the meaning of the various metacharacters, you will see that regular expressions are powerful for isolating and replacing specific textual data.

Data validation, identification of duplicate word occurrences, detection of extraneous white spaces, or parsing of strings are just some of the many uses of regular expressions. You can apply them in order to validate the formats of phone numbers, zip codes, email addresses, Social Security numbers, IP addresses, filenames and pathnames, and so on. Furthermore, you can locate patterns such as HTML tags, numbers, dates, or anything that fits any pattern within any textual data and replace them with other patterns.

Using Regular Expressions With Oracle Database 10g

To harness the power of regular expressions, you can exploit the newly introduced Oracle SQL REGEXP_LIKE operator and the REGEXP_INSTR, REGEXP_SUBSTR, and REGEXP_REPLACE functions. You will see how this new functionality supplements the existing LIKE operator and the INSTR, SUBSTR, and REPLACE functions. In fact, they are similar to the existing operator and functions but now offer powerful pattern-matching capabilities. The searched data can be simple strings or large volumes of text stored in the database character columns. Regular expressions let you search, replace, and validate data in ways you have never thought of before, with a high degree of flexibility.

Basic Examples of Regular Expressions

Before using the new functionality, you need to understand the meaning of some of the metacharacters. The period (.) matches any character (except newline) in a regular expression. For example, the regular expression a.b matches a string containing the letter a, followed by any other single character (except newline), followed by the letter b. The strings axb, xaybx, and abba are matches because this pattern is buried in the string. If you want to exactly match a three-letter string in which the line begins with a and ends with b, you must anchor the regular expression. The caret (^) metacharacter indicates the start of a line, and the dollar symbol ($) designates the end of the line (see Table 1). Therefore, the regular expression ^a.b$ matches the strings aab, abb, or axb. To contrast this approach with the familiar pattern matching available with the LIKE operator, you can express such a pattern as a_b, where the underbar (_) is the one-character wildcard.

By default, an individual character or character list in a regular expression matches just once. To indicate multiple occurrences of a character in a regular expression, you apply a quantifier, also called a repetition operator. If you want a match that starts with the letter a and ends with the letter b, your regular expression looks like this: ^a.*b$. The * metacharacter repeats the preceding match any metacharacter (.) zero, one, or more times. The equivalent pattern with the LIKE operator is a%b, with the percent (%) indicating zero, one, or multiple occurrences of any character.

Table 2 shows the complete list of repetition operators. Notice that it contains specific repetition choices that allow more flexibility than the existing LIKE wildcard characters. If you use parentheses around an expression, effectively creating a subexpression, the subexpression can be repeated a certain number of times. For example, the regular expression b(an)*a matches ba, bana, banana, yourbananasplit, and so on.

Oracle's regular expression implementation supports the POSIX (Portable Operating System Interface) character classes, as listed in Table 3. This means that you can be very specific about the type of character you are looking for. Imagine writing a LIKE condition that looks only for nonalphabetic characters—the resulting WHERE clause could easily become very complex.

The POSIX character class must be enclosed by a character list indicated by square brackets ([]). For example, the regular expression [[:lower:]] matches a lowercase character and [[:lower:]]{5} matches five consecutive lowercase characters.

Besides the POSIX character classes, you can place individual characters in a character list. For example, the regular expression ^ab[cd]ef$ matches the strings abcef and abdef. Either c or d must be chosen.

Most metacharacters inside a character list are understood as literals, with the exception of the caret (^) and the hyphen (-). Regular expressions appear complicated because some metacharacters have multiple meanings, depending on the context. The ^ is just one such metacharacter. If you use it as the first character inside a character list, it means the negation of a character list. Therefore, [^[:digit:]] looks for a pattern consisting of any nondigit character whereas ^[[:digit:]] looks for matches that start with a digit. The hyphen (-) indicates a range; the regular expression [a-m] matches any of the letters a through letter m. But it means the literal hyphen if it is the first character in a character list such as in [-afg].

One of the previous examples introduced the use of parentheses to create a subexpression; they allow you to enter alternates separated by the vertical bar (|) alteration metacharacter.

For example, the regular expression t(a|e|i)n allows three possible alternate characters between the letters t and n. Matches include words such as tan, ten, tin, and Pakistan but not teen, mountain, or tune. Alternatively, the regular expression t(a|e|i)n can also be expressed as a character list, which is t[aei]n. Table 4 summarizes these metacharacters. Although more metacharacters exist, this brief overview is sufficient for understanding the regular expressions this article uses.

The REGEXP_LIKE Operator

The REGEXP_LIKE operator introduces you to regular expression functionality when applied within the Oracle database. Table 5 lists the syntax of REGEXP_LIKE.

The following SQL query's WHERE clause shows the REGEXP_LIKE operator, which searches the ZIP column for a pattern that satisfies the regular expression [^[:digit:]]. It will retrieve those rows in the ZIPCODE table for which the ZIP column values contain any character that is not a numeric digit.

SELECT zip
  FROM zipcode
 WHERE REGEXP_LIKE(zip, '[^[:digit:]]')
ZIP
-----
ab123
123xy
007ab
abcxy

This example of a regular expression consists only of metacharacters—more specifically the POSIX character class digit delimited by colons and square brackets. The second set of brackets (as in [^[:digit:]]) encloses a character class list. As previously mentioned, this is required because you can use POSIX character classes only for constructing a character list.

The REGEXP_INSTR Function

This function returns the starting position of a pattern, so it works much like the familiar INSTR function. The syntax of the new REGEXP_INSTR function is shown in Table 6. The main difference between the two functions is that REGEXP_INSTR lets you specify a pattern instead of a specific search string; thus providing greater versatility. The next example uses REGEXP_INSTR to return the starting position of the five-digit zip-code pattern within the string Joe Smith, 10045 Berry Lane, San Joseph, CA 91234. If the regular expression is written as [[:digit:]]{5}, you will get the house number's starting position instead of the zip code's, because 10045 is the first occurrence of five consecutive digits. Therefore, you must anchor the expression to the end of the line, as indicated with the $ metacharacter, and the function will display the starting position of the zip code regardless of the number of digits for the house number.

SELECT REGEXP_INSTR('Joe Smith, 10045 Berry Lane, San Joseph, CA 91234',
       '[[:digit:]]{5}$')
       AS rx_instr
  FROM dual
  RX_INSTR
----------
        45

Writing More Complex Patterns

Let's expand on the zip code pattern of the previous example to include an optional four digits. Your pattern may now look like this: [[:digit:]]{5}(-[[:digit:]]{4})?$. If your source string ends in either the 5-digit zip code or the 5-digit + 4 zip-code format, you'll be able to show the pattern's starting position.

SELECT REGEXP_INSTR('Joe Smith, 10045 Berry Lane, San Joseph, CA 91234-1234',
       ' [[:digit:]]{5}(-[[:digit:]]{4})?$')
    AS starts_at
  FROM dual
 STARTS_AT
----------
        44

In this example the parenthesized subexpression (-[[:digit:]]{4}) is repeated zero or one times, as indicated by the ? repetition operator. Again, attempting to use the traditional SQL functions to accomplish the same result poses a challenge even to SQL experts. To better explain the various components of the regular expression example, Table 7 contains a description of the individual literals and metacharacters.

The REGEXP_SUBSTRFunction

The REGEXP_SUBSTR function, much like the SUBSTR function, extracts part of a string. Table 8 displays the syntax of the new function. In the following example, the string that matches the pattern , [^,]*, is returned. The regular expression searches for a comma followed by a space; then zero or more characters that are not commas, as indicated by [^,]*; and lastly looks for another comma. The pattern will look somewhat similar to a comma-separated values string.

SELECT REGEXP_SUBSTR('first field, second field , third field',
       ', [^,]*,')
  FROM dual
REGEXP_SUBSTR('FIR
------------------
, second field   ,

The REGEXP_REPLACE Function

Let's first look at the traditional REPLACE SQL function, which substitutes one string with another. Assume your data has extraneous spaces in the text and you would like to replace them with a single space. With the REPLACE function, you need to list exactly how many spaces you want to replace. However, the number of extra spaces may not be the same everywhere in the text. The next example has three spaces between Joe and Smith. The REPLACE function's parameter specifies that two spaces should be replaced with one space. In this case, the result leaves an extra space where there were three spaces in the original string between Joe and Smith.

SELECT REPLACE('Joe   Smith','  ', ' ')
       AS replace
  FROM dual
REPLACE
---------
Joe Smith

The REGEXP_REPLACE function takes the substitution a step further; the syntax is listed in Table 9. The following query replaces any two or more spaces with a single space. The ( ) subexpression contains a single space, which can be repeated two or more times, as indicated by {2,}.

SELECT REGEXP_REPLACE('Joe   Smith',
       '( ){2,}', ' ')
       AS RX_REPLACE
  FROM dual
RX_REPLACE
----------
Joe Smith

Backreferences

A useful feature of regular expressions is the ability to store subexpressions for reuse later; this is also called backreferencing (summarized in Table 10). It allows sophisticated replace capabilities such as swapping patterns in new positions or indicating repeated word or letter occurrences. The matched part of the subexpression is stored in a temporary buffer. The buffer is numbered from left to right and accessed with the \digit notation, where digit is a number between 1 and 9 and matches the digit-th subexpression, as indicated by a set of parentheses.

The next example shows the name Ellen Hildi Smith transformed to Smith, Ellen Hildi, by referring to the individual subexpressions by number.

SELECT REGEXP_REPLACE(
       'Ellen Hildi Smith',
       '(.*) (.*) (.*)', '\3, \1 \2')
  FROM dual
REGEXP_REPLACE('EL
------------------
Smith, Ellen Hildi

The SQL statement shows three individual subexpressions enclosed by parentheses. Each individual subexpression consists of a match any metacharacter (.) followed by the * metacharacter, indicating that any character (except newline) must be matched zero or more times. A space separates each subexpression and must be matched as well. The parentheses create subexpressions that capture the values and can be referenced with \digit. The first subexpression is assigned \1, the second \2, and so on. These backreferences are used in the last parameter of this function (\3, \1 \2), which effectively returns the replacement substrings and places them in the desired format (including comma and spaces). Table 11 details the individual components of this regular expression.

Backreferences are useful for replacing, formatting, and substituting values, and you can apply them to find adjacent occurrences of values. The next example shows use of the REGEP_SUBSTR function to find any duplicate occurrences of alphanumeric values separated by a space. The displayed result shows the substring that identifies the duplicated words is.

SELECT REGEXP_SUBSTR(
       'The final test is is the implementation',
       '([[:alnum:]]+)([[:space:]]+)\1') AS substr
  FROM dual
SUBSTR
------
is is

The Match Parameter Option

You may have noticed that the regular expression operator and functions contain an optional match parameter. This parameter controls case-sensitivity, matching of the newline character, and retaining multiline inputs.

Practical Applications for Regular Expressions

You can use regular expressions not only in queries but also anywhere you can use a SQL operator or function, such as in the PL/SQL language. You can write triggers that take advantage of regular expression functionality in order to validate, generate, or extract values.

The next example illustrates how you can apply the REGEXP_LIKE operator in a column check constraint for data validation. It checks for the correct Social Security number format upon insert or update. Social Security numbers in such formats as 123-45-6789 and 123456789 are acceptable values for this column constraint. Valid data must begin with three digits, followed by a hyphen, two more digits and a hyphen, and lastly another four digits. The alternate expression allows only nine consecutive digits. The vertical bar symbol (|) separates the individual choices.

ALTER TABLE students
  ADD CONSTRAINT stud_ssn_ck CHECK
  (REGEXP_LIKE(ssn,
  '^([[:digit:]]{3}-[[:digit:]]{2}-[[:digit:]]{4}|[[:digit:]]{9})$'))

Leading or trailing characters are not acceptable, as indicated by ^ and $. Make sure your regular expression does not split across multiple lines or contain any extraneous spaces unless you want them to be part of the pattern and matched accordingly. Table 12 explains the individual components of this regular expression example.

Next Steps

Visit the Oracle Database 10g page:
/products/database/oracle10g/index.html

Comparing Regular Expressions to Existing Functionality

Regular expressions have several advantages over the familiar LIKE operator and INSTR, SUBSTR, and REPLACE functions. These traditional SQL functions have no facility for matching patterns. Only the LIKE operator performs matching of characters, through the use of the % and _ wildcards, but LIKE does not support repetitions of expressions, complex alternations, ranges of characters, characters lists, POSIX character classes, and so on. Furthermore, the new regular expression functions allow detection of duplicate word occurrences and swapping of patterns. The examples here offer you a glimpse into the world of regular expressions and on how you can apply them in your applications.

A Solid Addition to Your Toolkit

Because they help solve complex problems, regular expressions are very powerful. Some of the functionality of regular expressions is difficult to duplicate by using traditional SQL functions. When you've learned the basic building blocks of this somewhat cryptic language, regular expressions will become an indispensable part of your toolkit in the context of not only SQL but also other programming languages. Although trial and error are sometimes necessary to get your individual pattern right, the elegance and power of regular expressions is indisputable.

Alice Rischert (ar280@yahoo.com) chairs the Database Application Development and Design track at Columbia University's Computer Technology and Application Program. She is the author of the Oracle SQL Interactive Workbook 2nd edition (Prentice Hall, 2002) and the forthcoming Oracle SQL by Example (Prentice Hall, 2003). Rischert has over 15 years of experience as a database architect, DBA, and project leader for Fortune 100 companies and she has worked with Oracle since version 5.

Table 1: Anchoring Metacharacters

Metacharacter Description
^ Anchor the expression to the start of a line
$ Anchor the expression to the end of a line

Table 2: Quantifiers, or Repetition Operators

Quantifier Description
* Match 0 or more times
? Match 0 or 1 time
+ Match 1 or more times
{m} Match exactly m times
{m,} Match at least m times
{m, n} Match at least m times but no more than n times

Table 3: Predefined POSIX Character Classes

Character Class Description
[:alpha:] Alphabetic characters
[:lower:] Lowercase alphabetic characters
[:upper:] Uppercase alphabetic characters
[:digit:] Numeric digits
[:alnum:] Alphanumeric characters
[:space:] Space characters (nonprinting), such as carriage return, newline, vertical tab, and form feed
[:punct:] Punctuation characters
[:cntrl:] Control characters (nonprinting)
[:print:] Printable characters

Table 4: Alternate Matching and Grouping of Expressions

Metacharacter Description
| Alternation Separates alternates, often used with grouping operator ()
( ) Group Groups subexpression into a unit for alternations, for quantifiers, or for backreferencing (see "Backreferences" section)
[char] Character list Indicates a character list; most metacharacters inside a character list are understood as literals, with the exception of character classes, and the ^ and - metacharacters

Table 5: The REGEXP_LIKE Operator

Syntax Description
REGEXP_LIKE(source_string, pattern
[, match_parameter])
source_string supports character datatypes (CHAR, VARCHAR2, CLOB, NCHAR, NVARCHAR2, and NCLOB but not LONG). The pattern parameter is another name for the regular expression. match_parameter allows optional parameters such as handling the newline character, retaining multiline formatting, and providing control over case-sensitivity.

Table 6: The REGEXP_INSTR Function

Syntax Description
REGEXP_INSTR(source_string, pattern
[, start_position
[, occurrence
[, return_option
[, match_parameter]]]])
This function looks for a pattern and returns the first position of the pattern. Optionally, you can indicate the start_position you want to begin the search. The occurrence parameter defaults to 1 unless you indicate that you are looking for a subsequent occurrence. The default value of the return_option is 0, which returns the starting position of the pattern; a value of 1 returns the starting position of the next character following the match.

Table 7: Explanation of 5-digit + 4 Zip-Code Expression

Syntax Description
  Empty space that must be matched
[:digit:] POSIX numeric digit class
] End of character list
{5} Repeat exactly five occurrences of the character list
( Start of subexpression
- A literal hyphen, because it is not a range metacharacter inside a character list
[ Start of character list
[:digit:] POSIX [:digit:] class
[ Start of character list
] End of character list
{4} Repeat exactly four occurrences of the character list
) Closing parenthesis, to end the subexpression
? The ? quantifier matches the grouped subexpression 0 or 1 time thus making the 4-digit code optional
$ Anchoring metacharacter, to indicate the end of the line

Table 8: The REGEXP_SUBSTR Function

Syntax Description
REGEXP_SUBSTR(source_string, pattern
[, position [, occurrence
[, match_parameter]]])
The REGEXP_SUBSTR function returns the substring that matches the pattern.

Table 9: The REGEXP_REPLACE Function

Syntax Description
REGEXP_REPLACE(source_string, pattern
[, replace_string [, position
[,occurrence, [match_parameter]]]])
This function replaces the matching pattern with a specified replace_string, allowing complex search-and-replace operations.

Table 10: Backreference Metacharacter

Metacharacter Description
\digit Backslash Followed by a digit between 1 and 9, the backslash matches the preceding digit-th parenthesized subexpression.
(Note: The backslash has another meaning in regular expressions; depending on the context it can also mean the Escape character

Table 11: Explanation of Pattern-Swap Regular Expression

Regular-Expression Item Description
( Start of first subexpression
. Match any single character except a newline
* Repetition operator, matches previous . metacharacter 0 to n times
) End of first subexpression; result of the match is captured in \1
(In this example, it's Ellen.)
  Empty space that needs to be present
( Start of the second subexpression
. Match any single character except a newline
* Repetition operator matches the previous . metacharacter 0 to n times
) End of second subexpression; result of this match is captured in \2
(In this example, it stores Hildi.)
  Empty space
( Start of third subexpression
. Match any single character except a newline
* Repetition operator matches . metacharacter 0 to n times
) End of third subexpression; result of this match is captured in \3
(In this example, it holds Smith.)

Table 12: Explanation of the Social Security Number Regular Expression

Regular-Expression Item Description
^ Start of line character (Regular expression cannot have any leading characters before the match.)
( Start subexpression and list alternates separated by the | metacharacter
[ Start of character list
[:digit:] POSIX numeric digit class
] End of character list
{3} Repeat exactly three occurrences of character list
- A hyphen
[ Start of character list
[:digit:] POSIX numeric digit class
] End of character list
{2} Repeat exactly two occurrences of character list
- Another hyphen
[ Start of character list
[:digit:] POSIX numeric digit class
] End of character list
{4} Repeat exactly four occurrences of character list
| Alternation metacharacter; ends the first choice and starts the next alternate expression
[ Start of character list
[:digit:] POSIX numeric digit class.
] End of character list
{9} Repeat exactly nine occurrences of character list
) Ending parenthesis, to close the subexpression group used for alternation
$ Anchoring metacharacter, to indicate the end of the line; no extra characters can follow the pattern

프로젝트 막바지.... 아니 막바지도 더 지나서 삽질중인 요즘..
힘들다고 퍼질 여유조차 없이 달리고 있다...

그래도... 내가 가진게 아무리 없어도... 내가 할수 있는것이 아무것도 없고
저 밑바닥에서 땅짚고 헤엄치고 있어도....

그래도 기뻐해야 한다...


내 뜻이나 내 의지가 아니라...온전히 하나님이 원하시는대로....

'Talk About > Dsus4’s Mind' 카테고리의 다른 글

미안합니다. 여러분.  (0) 2008.05.26
블로그!,블로거?,블로깅!  (0) 2007.08.16
AweSome God  (0) 2007.05.08
CACAO 99%  (2) 2007.02.14
Faith in Motion  (0) 2006.09.29

현충일을 맞이하여 식구들이 떼로 모였었습니다...
고모부가 오셔서.... 사진을 찍어 줬어요....

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070723 일상의 아침  (1) 2007.07.23
20070721 소아과 다녀오는길  (0) 2007.07.21
20070522 시체놀이  (0) 2007.05.22
20070520 주일 저녁  (0) 2007.05.20
20070513 부평공원 입구  (0) 2007.05.13
미현이 돌잔치에 다녀왔어요...
그동안 아파서 살이 쪽 빠졌네요...
고생많이 했어요..
오늘길에 청계천에 들러서 구경도 좀 했습니다... 잘 꾸며놓기는 했더군요.

사용자 삽입 이미지

어감은 좀 않좋지만..암튼 리얼 시체놀이를 보고 계십니다...
아직 여름도 아닌데... 널부러져 있네요...

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070721 소아과 다녀오는길  (0) 2007.07.21
20070606 집에서~  (0) 2007.06.06
20070520 주일 저녁  (0) 2007.05.20
20070513 부평공원 입구  (0) 2007.05.13
20070505 처음타본 인라인 스케이트  (0) 2007.05.05
교회에 갔다가... 이런저런 일들을 마치고... 집에 왔습니다.
지난주에 대학시절 유일한 신돌이(신디를 치는 남정네 - 흔치않음...) 에게서 업어온 모자를 씌워봤습니다....
머리가 작아보입니다...이런 경축스러운 일이....모자의 뿔이 워낙 큰이유도 있지만....머리가 작아보입니다......
그와중에도 수는 엎어져서 온 얼굴을 침으로 발라놔서리.... 닦아주기전에 한컷~ ^^

산이 강이 머리를 짧게 잘라줬습니다..
강이는 처음으로 짧게 잘라봤는데..어릴적에 삭발을 안해서 그런가..은근히 머리숱이 적습니다.. 확 한번 밀어줄걸 그랬나...

사용자 삽입 이미지

이것이 바로 침범벅~ 침으로 세수를 한 얼굴입죠~

'Photo Album > Family' 카테고리의 다른 글

20070606 집에서~  (0) 2007.06.06
20070522 시체놀이  (0) 2007.05.22
20070513 부평공원 입구  (0) 2007.05.13
20070505 처음타본 인라인 스케이트  (0) 2007.05.05
20070505 어린이날 - 우리들은 자란다~ 잇힝~  (0) 2007.05.05

업무차 아침부터 외근을 나갔다가 오후에 퇴근하던길에.... 학교 동아리방에 잠시 들러보았습니다.
워...이미 띠동갑을 넘어선 후배들이 인사를 하더군요... 성향도 바뀌고 아이들도 바뀌었지만.. 그래도 즐거웠습니다. 시대의 변화에 적응하지 못하는 조직은 도태된다고 하지요..
나름대로 잘 적응해나가가고, 살아남아서 움직이는 아이들을 보면서 감사했습니다.

몇명 찍어주지는 못했지만... 내 후배들이기에 이곳에 남겨봅니다...

사용자 삽입 이미지

07학번이랍니다... 음..07이라...


'Photo Album > By Dsus4' 카테고리의 다른 글

20100429 개발2팀 저녁모임~  (0) 2010.04.29
20070408 여수바닷가  (0) 2007.04.08
20040918 제주도 풍경  (0) 2004.09.18
20040818 노을  (0) 2004.08.18
20040626 소래포구 갈매기떼  (0) 2004.06.26

시내쪽에 나갔다가 부평공원을 가로질러 집에 갈라치면... 미군 캠프마켓으로 연결되는 철도가 있습니다. 기찻길과 부평공원 입구에서 사진을~

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070522 시체놀이  (0) 2007.05.22
20070520 주일 저녁  (0) 2007.05.20
20070505 처음타본 인라인 스케이트  (0) 2007.05.05
20070505 어린이날 - 우리들은 자란다~ 잇힝~  (0) 2007.05.05
20070429 교회가는날  (0) 2007.04.29

나에게 결정하라 한다..
아니 결정이 되어 있다..그리고 행하라 하는데.. 겁이난다..
과연 그렇게 하는게 정말로 원하시는걸까..
온전한 믿음과 확신이 먼저일까.. 행함이 먼저일까..
행함 가운데서 확신을 찾아야 하는걸까... 일단 확신후에 뛰어들어야 하는걸까..
너무 무겁고, 힘들고, 어려운 자리여서...
지금까지 힘들어하는 녀석들의 모습을 보면서도 나스스로 외면 하고 있었던거라고,
내 마음은 지금도 그렇게 외쳐대는데...

Awesome God

Our God is an awesome God
He reigns from heaven above
With wisdom, power, and love
Our God is an awesome God

'Talk About > Dsus4’s Mind' 카테고리의 다른 글

블로그!,블로거?,블로깅!  (0) 2007.08.16
정신없는 일상? 일상은 아니지...  (0) 2007.07.05
CACAO 99%  (2) 2007.02.14
Faith in Motion  (0) 2006.09.29
나는 운전이 무섭다  (2) 2006.08.16
산이 어린이날 선물로 인라인 스케이트를 사줬습니다.
집에서 좀 가르친 후에 여름이 되면 토요일마다 산이랑 인라인을 즐겨볼 생각입니다.
일단 생각은... 의외로 강이가 인라인을 타고 잘 서있더군요..균형도 잘잡고.
허나 나이는 못속이는지..금방 힘들다고..^^

사용자 삽입 이미지

'Photo Album > Family' 카테고리의 다른 글

20070520 주일 저녁  (0) 2007.05.20
20070513 부평공원 입구  (0) 2007.05.13
20070505 어린이날 - 우리들은 자란다~ 잇힝~  (0) 2007.05.05
20070429 교회가는날  (0) 2007.04.29
20070428 웃는얼굴 우는얼굴  (0) 2007.04.28
어린이날을 맞이하여 백화점에 일보러 가는길에..ㅋㅋ 부평공원에 잠시 들렀습니다.
사람도 많고 날도 덥고...잠시지만 즐겁게 놀았습니다.
사용자 삽입 이미지

+ Recent posts