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 feature to treat source as regexp #17

Open
jsvd opened this issue Dec 23, 2015 · 2 comments
Open

Add feature to treat source as regexp #17

jsvd opened this issue Dec 23, 2015 · 2 comments

Comments

@jsvd
Copy link
Member

jsvd commented Dec 23, 2015

currently is possible to use :regex => true to treat dictionary keys as regexp, but would be nice to have the opposite: use contents of source as regexp that will match against exact dictionary keys

@jordansissel
Copy link
Contributor

@jsvd got an example use case in mind?

@jsvd
Copy link
Member Author

jsvd commented Dec 29, 2015

the use case came from a user that had a dictionary of postal codes to locations but sometimes the data from events wasn't very precise and the idea was to match the closest.

Example

dictionary:

10LX145: Lisbon
15OP141: Porto

an event arrives with field: "pcode" => "10LX14"

There's no way to match the code 10LX14 with 10LX145

with this feature /10LX14/ would match 10LX145

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

No branches or pull requests

2 participants