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 support for regular expressions in ResponseMatcher struct in text.rs #108

Merged
merged 2 commits into from
Apr 2, 2023

Conversation

MindPatch
Copy link
Contributor

for #99
This commit adds support for regular expressions to the ResponseMatcher struct in text.rs. The new match_and_body and match_once_body methods now accept an optional boolean parameter is_regex to enable or disable regex matching. The methods use the regex crate to compile and match regular expressions against the body string parameter.

This change improves the versatility of the ResponseMatcher struct and allows for more precise matching of text responses in Lua scripts.

@MindPatch MindPatch changed the title Extract regex Add support for regular expressions in ResponseMatcher struct in text.rs Apr 2, 2023
@MindPatch MindPatch merged commit 509b198 into 0.5-beta Apr 2, 2023
@MindPatch MindPatch deleted the extract_regex branch April 2, 2023 21:18
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.

1 participant