Crates.io | ecma_regex |
lib.rs | ecma_regex |
version | 0.0.2 |
source | src |
created_at | 2023-02-04 09:58:22.989862 |
updated_at | 2023-02-15 15:45:30.225692 |
description | regex in ECMAScript regular expression syntax! |
homepage | |
repository | https://github.com/hyf0/ecma_regex |
max_upload_size | |
id | 776286 |
size | 18,516 |
The goal of ecma_regex
is to provide the same functionality as the regex crate in ECMAScript regular expression syntax.
Build on top of libregexp-sys.
Regexp
in ECMAScript is stateful while ecma_regex
is stateless.
Regexp
in ECMAScript need to deal with flags like g
, m
, s
, u
, y
while ecma_regex
doesn't. The corresponding behaviors in different flags are implemented as different methods in ecma_regex
crate.
It's possible to write a Regexp
crate having the same behavior as ECMAScript Regexp
, but it's not the goal of this crate.
The API try to align with regex crate and reuse it's documents, credit to the author and contributors.