Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parsing regex with slashes fails #151

Open
cgx-system opened this issue Dec 6, 2024 · 0 comments
Open

parsing regex with slashes fails #151

cgx-system opened this issue Dec 6, 2024 · 0 comments

Comments

@cgx-system
Copy link

cgx-system commented Dec 6, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant