Regex

๊ฐœ๋…

Groups and ranges

Chracter

๋œป

|

๋˜๋Š”

()

๊ทธ๋ฃน

[]

๋ฌธ์ž์…‹, ๊ด„ํ˜ธ ์•ˆ์˜ ์–ด๋–ค ๋ฌธ์ž๋“ 

[^]

๋ถ€์ • ๋ฌธ์ž์…‹, ๊ด„ํ˜ธ์•ˆ์˜ ์–ด๋–ค ๋ฌธ์ž๊ฐ€ ์•„๋‹ ๋•Œ

(?:)

์ฐพ์ง€๋งŒ ๊ธฐ์–ตํ•˜์ง€๋Š” ์•Š์Œ

Quantifiers

Character

๋œป

?

์—†๊ฐ€๋‚˜ ์žˆ๊ฑฐ๋‚˜ (zero or one)

*

์—†๊ฑฐ๋‚˜ ์žˆ๊ฑฐ๋‚˜ ๋งŽ๊ฑฐ๋‚˜(zero or more)

+

ํ•˜๋‚˜ ๋˜๋Š” ๋งŽ์ด (one or more)

{n}

n๋ฒˆ ๋ฐ˜๋ณต

{min,}

์ตœ์†Œ

{min,max}

์ตœ์†Œ, ๊ทธ๋ฆฌ๊ณ  ์ตœ๋Œ€

Boundary-type

Chracter

๋œป

\b

๋‹จ์–ด ๊ฒฝ๊ณ„

\B

๋‹จ์–ด ๊ฒฝ๊ณ„๊ฐ€ ์•„๋‹˜

^

๋ฌธ์žฅ์˜ ์‹œ์ž‘

$

๋ฌธ์žฅ์˜ ๋

Character classes

Chracter

๋œป

\

ํŠน์ˆ˜ ๋ฌธ์ž๊ฐ€ ์•„๋‹Œ ๋ฌธ์ž

.

์–ด๋–ค ๊ธ€์ž(์ค„๋ฐ”๊ฟˆ ๋ฌธ์ž ์ œ์™ธ)

\d

digit ์ˆซ์ž

\D

digit ์ˆซ์ž ์•„๋‹˜

\w

word ๋ฌธ์ž

\W

word ๋ฌธ์ž ์•„๋‹˜

\s

space ๊ณต๋ฐฑ

\S

space ๊ณต๋ฐฑ ์•„๋‹˜

์—ฐ์Šต์šฉ ์‚ฌ์ดํŠธ

์˜ˆ์‹œ

์ด๋ฉ”์ผ

[a-z0-9A-Z_.+]+@[a-z0-9A-Z_.]+.[a-z0-9A-Z_.]

Last updated