주 메뉴 열기

wwiki β

바뀜

정규식

22 바이트 추가됨, 2022년 6월 7일 (화) 03:20
POSIX basic and extended
!<code>[ ]</code>
|문자 클래스
|A bracket expression. Matches a '''single character ''' that is contained within the brackets. For example, <code>[abc]</code> matches "a", "b", or "c". <code>[a-z]</code> specifies a range which matches any lowercase letter from "a" to "z". These forms can be mixed: <code>[abcx-z]</code> matches "a", "b", "c", "x", "y", or "z", as does <code>[a-cx-z]</code>.
The <code>-</code> character is treated as a literal character if it is the last or the first (after the <code>^</code>, if present) character within the brackets: <code>[abc-]</code>, <code>[-abc]</code>. Note that backslash escapes are not allowed. The <code>]</code> character can be included in a bracket expression if it is the first (after the <code>^</code>) character: <code>[]abc]</code>.
|-
!<code>[^ ]</code>
|'''부정'''
|Matches a single character that is not contained within the brackets. For example, <code>[^abc]</code> matches any character other than "a", "b", or "c". <code>[^a-z]</code> matches any single character that is not a lowercase letter from "a" to "z". Likewise, literal characters and ranges can be mixed.
|-
== 외부링크 ==
<nowiki>https://regexr.com/</nowiki>[[분류:프로그래밍]]
편집
2,431