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

Propose new Query method similar to re.search() #32

Closed
wearp opened this Issue Oct 10, 2014 · 3 comments

Comments

2 participants
@wearp
Contributor

wearp commented Oct 10, 2014

Query.matches(), which uses re.match, searches from beginning of field value. I propose a new feature that mirrors python's re.search and allows matching inside field value, not just a beginning.

Perhaps this could be done by additional parameter to QueryRegex (something like re_method) to distinguish between Query.matches() and Query.search.

I can submit pull request if ready?

@msiemens

This comment has been minimized.

Show comment
Hide comment
@msiemens

msiemens Oct 10, 2014

Owner

Sounds reasonable to me. Pull requests are welcome :)

Owner

msiemens commented Oct 10, 2014

Sounds reasonable to me. Pull requests are welcome :)

@msiemens

This comment has been minimized.

Show comment
Hide comment
@msiemens

msiemens Oct 14, 2014

Owner

I renamed it to Query.contains. That way it matches Query.matches better and reads nicer:

where('field').contains('regex')
Owner

msiemens commented Oct 14, 2014

I renamed it to Query.contains. That way it matches Query.matches better and reads nicer:

where('field').contains('regex')
@wearp

This comment has been minimized.

Show comment
Hide comment
@wearp

wearp Oct 14, 2014

Contributor

That's cool. Makes more sense. I thought about it at first but saw there was another function with same name. Been away on holidays - only just checked emails.

Sent from my iPhone

On 14 Oct 2014, at 17:41, Markus Siemens notifications@github.com wrote:

I renamed it to Query.contains to better match Query.matches. That way it reads nicer:

where('field').contains('regex')

Reply to this email directly or view it on GitHub.

Contributor

wearp commented Oct 14, 2014

That's cool. Makes more sense. I thought about it at first but saw there was another function with same name. Been away on holidays - only just checked emails.

Sent from my iPhone

On 14 Oct 2014, at 17:41, Markus Siemens notifications@github.com wrote:

I renamed it to Query.contains to better match Query.matches. That way it reads nicer:

where('field').contains('regex')

Reply to this email directly or view it on GitHub.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment