2015/10/26

정규식 사용법 (Update:20151027)

http://kiros33.blog.me/220092128634


Revision History
2015/03/27 15:42:39 - 최소 범위 탐색하는 방법 추가
2015/10/27 15:34:25 - 정규 표현식 옵션 페이지 링크, 대소문자 변경 방법 추가
  
Reference Page
[펌] 정규 표현식 옵션 


예문 1) 
In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.


>>>>> 시작 문자열 혹은 종료 문자열 사이에 있는 문자열을 찾는 경우

시작 문자열 표현식 
표현식: (?<=,) and

In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.
  
종료 문자열 표현식  
표현식:  a (?=regular)

In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.


>>>>> 최소 범위 탐색하는 방법, 문자열 매칭 특히 불특정 다수 문자를 중간에 넣고 싶을 때 범위 탐색 기능

일반 표현식
표현식: \(.*\)

In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.​
    
최소 범위 지정
?표시를 수량 지시자 *, +, ?, {m, n} 등의 뒤에 붙여서 사용할 수 있음
표현식: \(.*?\)

In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.​



>>>>> 대소문자 변경 

대소문자 변경시 캡처한 그룹 앞뒤에 시작(\U or \L)과 종료(\E) 표시를 추가하면 변경할 수 있습니다.
  
대문자 변경시: \U$1\E, 첫 번째 그룹을 대문자
소문자 변경시: \L$1\E, 첫 번째 그룹을 소문자로

정규식 엔진에 따라서 \U\1\E, U\1\E 이 동작할 수 도 있습니다.


표현식: ( )(m)(atch)
치환식: $1\U$2\E$3
In theoretical computer science and formal language theory, a regular expression (abbreviated regex or regexp) is a sequence of characters that forms a search pattern, mainly for use in pattern matching with strings, or string matching, i.e. "find and replace"-like operations. The concept arose in the 1950s, when the American mathematician Stephen Kleene formalized the description of a regular language, and came into common use with the Unix text processing utilities ed, an editor, and grep (global regular expression print), a filter.​




검색 : Regular Expression, RegEx, RegExp, 정규식, 정규표현식, 정규 표현식, Example, 예 예제, Sample, 샘플, Usage, 용법, 사용법, 

댓글 없음:

댓글 쓰기