# Super Expressive - 자연어와 비슷한 함수들로 정규식 만들기

> Clean Markdown view of GeekNews topic #2498. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2498](https://news.hada.io/topic?id=2498)
- GeekNews Markdown: [https://news.hada.io/topic/2498.md](https://news.hada.io/topic/2498.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-07-22T09:13:40+09:00
- Updated: 2020-07-22T09:13:40+09:00
- Original source: [github.com](https://github.com/francisrstokes/super-expressive)
- Points: 8
- Comments: 2

## Topic Body

- 쉬운 영어들로 구성된 함수로 정규식을 구성하게 해주는 JS 라이브러리

예) 16-bit 헥사코드 인식

→ /^(?:0x)?([A-Fa-f0-9]{4})$/

→ SE()

ㅤ.startOfInput

ㅤ.optional.string('0x')

ㅤ.capture

ㅤㅤ.exactly(4).anyOf

ㅤㅤㅤ.range('A', 'F')

ㅤㅤㅤ.range('a', 'f')

ㅤㅤㅤ.range('0', '9')

ㅤㅤ.end()

ㅤ.end()

ㅤ.endOfInput

ㅤ.toRegex();

## Comments



### Comment 2366

- Author: iolothebard
- Created: 2020-07-22T15:01:59+09:00
- Points: 1

별로 자연어스럽지 않은...

### Comment 2370

- Author: kunggom
- Created: 2020-07-22T19:29:46+09:00
- Points: 1
- Parent comment: 2366
- Depth: 1

말 그대로 DSL이죠.
