정규식. TransformationalGrammar에서 RegularGrammar에 해당된다.

[Perl]에서의 지원이 강력하다. [Grep], [Awg]에도 유용히 쓰인다. [Python]에서는 re라는 built-in module에서 지원한다. 본 BioinfoWiki에서도 각종 매크로를 활용한 검색시 활용할 수 있다. (See also HelpOnMacros)

쉘에서 파일 및 디렉토리에 대한 WildCard도 유사하다.

RE syntax

syntax

meaning

.

any character

^

start of string

$

end of string

R*

zero or more of R

R+

one or more of R

R?

zero or one of R

R{m,n}

from m to n repetitions of R

[]

character set

R|R

alternative

RE special sequences

sequence

meaning

same

\num

text of group num

.

\A

only at the start of string

.

\b

empty string at word boundaries

.

\B

empty string not at word boundary

.

\d

any decimal digit

[0-9]

\D

any non-decimal digit

[^0-9]

\s

any whitespace character

[ \t\n\r\f\v]

\S

any nonwhitespace character

[^ \t\n\r\f\v]

\w

any alphanumeric character

[a-zA-Z0-9_]

\W

any non-alphanumeric character

[^a-zA-Z0-9_]


참고자료