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

Support of regex #9

Open
eharvey71 opened this issue Jul 6, 2023 · 1 comment
Open

Support of regex #9

eharvey71 opened this issue Jul 6, 2023 · 1 comment

Comments

@eharvey71
Copy link

Regex doesn't seem to work with all regex pattern matching operators. I want to exclude directories that contain python virtual environments which have a variety of names. something like /_env/ works but not the /[^.]_env/ below... I want to match on all characters except for a dot (.) in directory names: https://regex101.com/r/kpYkVr/1

backupy ~/dev /Volumes/exFAT-1TB/backups/dev --fe /node_modules/ /[^.]_env/ /amplify/

Any help is appreciated. Thanks!

@elesiuta
Copy link
Owner

elesiuta commented Jul 6, 2023

Backupy doesn't use / as a delimiter for its regexes like most other tools such as sed or awk, so here they are matching the / in the paths. You can omit them or use quotes instead, so either:

backupy ~/dev /Volumes/exFAT-1TB/backups/dev --fe node_modules [^.]_env amplify
or
backupy ~/dev /Volumes/exFAT-1TB/backups/dev --fe "node_modules" "[^.]_env" "amplify"

should work.

Hope that helps!

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

2 participants