Files
marqdo/lib/re.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

670 B

title, description
title description
lib/re Regular expressions (Mid M1). Unicode; no backreferences.

is_match

+ `text`
+ `pattern`

> host_re_is_match text=text pattern=pattern

find

+ `text`
+ `pattern`

> host_re_find text=text pattern=pattern

find_all

+ `text`
+ `pattern`

> host_re_find_all text=text pattern=pattern

replace

+ `text`
+ `pattern`
+ `with`
+ `count`=None

Optional count= limits replacements (None = all).

> host_re_replace text=text pattern=pattern with=with count=count

split

+ `text`
+ `pattern`

> host_re_split text=text pattern=pattern