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 RegexValueProvider #55

Merged
merged 3 commits into from
Aug 10, 2023
Merged

Add RegexValueProvider #55

merged 3 commits into from
Aug 10, 2023

Conversation

zprobst
Copy link
Contributor

@zprobst zprobst commented Aug 7, 2023

Adds a Value provider that works be regex-ing another value provider. The docs provide more details on usage.

@zprobst zprobst requested a review from ccloes as a code owner August 7, 2023 21:40
@zprobst zprobst changed the title Add RegexValueProvider Add RegexValueProvider Aug 7, 2023
Copy link
Contributor

@ccloes ccloes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have one question, but I assume its me misunderstanding.

node_type: HelloNode
key:
first_name: !regex
regex: "^(?P<first_name>[a-zA-Z]+)\s(?P<last_name>[a-zA-Z]+)$"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how <last_name> is used here... can you help me understand that? Seems like it would simply be dropped?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah you are right. This is just indicating that you can name groups and not use them all if that makes sense. Its only the group that you set in group that gets used.

@zprobst zprobst merged commit c00e54a into main Aug 10, 2023
2 checks passed
@zprobst zprobst deleted the feature/regex-value-provider branch August 10, 2023 01:14
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