gorules / zen

Open-source Business Rules Engine for your Rust, NodeJS, Python or Go applications.

Home Page:https://gorules.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

extract function invalid

chengguotao opened this issue · comments

extract('2022-02-01','(d{4})-(d{2})-(d{2})')
extract('foo.bar', '(w+).(w+)')
The extract function do not seem to work, returning "sptrs":[]

Hi @chengguotao, you need to use backslashes \. Here's the fixed version:
image

aaa.bbb.ccc.ddd
How to split by '.', get all letters, (\w+).(\w+) This way can only get the first '.' match