Files
marqdo/tests/lib/re-smoke.mq.md
T
cflmyandCursor 838a2b425a feat(stdlib): Mid M1 regex and encoding libraries
Add lib/re and lib/encoding (EN/ZH) backed by host_re_* and
host_encoding_*, with golds, public demos, and design docs.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-07 20:02:43 +08:00

24 lines
496 B
Markdown

---
title: lib/re smoke
import re:lib/re.mq.md
---
# main
*ok = > re.is_match text="abc123" pattern="\\d+"*
> print text=`ok`
*m = > re.find text="ab12cd34" pattern="\\d+"*
> print text=`m`
*all = > re.find_all text="a1b22c333" pattern="\\d+"*
*joined = > join value=`all` sep=","*
> print text=`joined`
*rep = > re.replace text="a1b2c3" pattern="\\d+" with="X" count=2*
> print text=`rep`
*parts = > re.split text="a-b-c" pattern="-"*
*pj = > join value=`parts` sep="|"*
> print text=`pj`