08-re-encodingok
Structure
importre:lib/re.mq.mdenc:lib/encoding.mq.md
fn · h1Regex and encoding in lib/
comment
fn · h1main
bind
`ok` = > re.is_match [email protected] pattern=^[^@]+@[^@]+$bind
`tok` = > enc.base64_encode text=marqdobind
`hex` = > enc.hex_encode text=okcall
> print text=`ok`call
> print text=`tok`call
> print text=`hex`branch
arm
`ok`call
> print text=mid-m1-okarm
elsecall
> print text=mid-m1-failFunctions
Variables
-
hex text6f6b6f6b
-
ok boolTrueTrue
-
tok textbWFycWRvbWFycWRv
Execution
True
bWFycWRv
6f6b
mid-m1-ok
Source
--- title: Mid stdlib — regex and encoding description: lib/re + lib/encoding without plugins (Mid M1) import re:lib/re.mq.md import enc:lib/encoding.mq.md --- # Regex and encoding in lib/ Mid-tier stdlib: everyday primitives stay in `lib/`, not ABI plugins. # main **`ok` = > re.is_match text="[email protected]" pattern="^[^@]+@[^@]+$"** **`tok` = > enc.base64_encode text="marqdo"** **`hex` = > enc.hex_encode text="ok"** > print text=`ok` > print text=`tok` > print text=`hex` 1. `ok` > print text=mid-m1-ok 2. * > print text=mid-m1-fail
Mid-tier stdlib: everyday primitives stay in
lib/, not ABI plugins.