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

Add casting to bool for expression regex matches #41

Merged
merged 1 commit into from
Dec 11, 2014

Conversation

cakper
Copy link
Contributor

@cakper cakper commented Dec 11, 2014

Evaluating regular expressions returns number of matches (so 1 if exact match exists) and matcher is using strict comparison === in order to evaluate such value.

Simple casting to boolean fixes the problem.

norberttech pushed a commit that referenced this pull request Dec 11, 2014
Add casting to bool for expression regex matches
@norberttech norberttech merged commit 6298c3c into coduo:master Dec 11, 2014
@cakper cakper deleted the fix-regex-matcher-edge-case branch December 11, 2014 12:41
@norberttech
Copy link
Member

Thanks! 🍻 (Sarmackie)

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

Successfully merging this pull request may close these issues.

2 participants