Skip to content

look-ahead and look-behind #964

@joyongzhu

Description

@joyongzhu

regex rule look-ahead and look-behind not supported?

example:
i have a text, and want to match zhe json str

jsonpgz({"fundcode":"000924"});

re:

(?<=jsonpgz\()(.+)(?=\);)

rust code:

let re = Regex::new("(?<=jsonpgz\\()(.+)(?=\\);)").unwrap();
let fund_json_str = re.captures("jsonpgz({"fundcode":"000924"});").unwrap();

run error:

look-around, including look-ahead and look-behind, is not supported

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions