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

Invalid preceding regular expression regex pattern #190

Open
Broick opened this issue Jan 28, 2021 · 1 comment
Open

Invalid preceding regular expression regex pattern #190

Broick opened this issue Jan 28, 2021 · 1 comment

Comments

@Broick
Copy link

Broick commented Jan 28, 2021

Tried adding several regex patterns like (?=.[a-z])(?=.[A-Z])(?=.[0-9])(?=.[!@\$%\^&\*])(?=.{8,})
(?=.\d)(?=.[a-z])(?=.[A-Z])(?=.[@$%&*]).{8,} etc but getting fatal error
Found that issue is caused when used ? after (
Can someone help?

@nasamuffin
Copy link

I don't maintain this project, but I have worked with it quite a lot.

Both git_grep() and regular_grep() functions in git-secrets script pass the -E flag to use "extended regular expressions". It looks like ERE doesn't support lookaround (what you're referring to as "preceding regular expressions". Have a look at this table (you can pick regex flavors by dropdown) to see for yourself. https://www.regular-expressions.info/refadv.html

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