Skip to content

parsing regex with slashes fails #151

@cgx-system

Description

@cgx-system

Hi,
I'd like to filter by a field containing a file path with slashes, like path/to/my/file_<id>.tld, with the <id> part as a wildcard.
I've tried aqp({ file: '/^path/to/my/file_.+\\.tld/' }) but it splits the string in an array :

{
  file: { '$in': [ /^path/, /my/ ] }
}

Is there a way to pass slashes in a regex ? I've also tride to urlencode the string or escape the slashes with \ but it doesn't work either.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions