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

Fix regex for detecting dosing compartments #1113

Merged
merged 2 commits into from
Nov 6, 2023
Merged

Fix regex for detecting dosing compartments #1113

merged 2 commits into from
Nov 6, 2023

Conversation

kylebaron
Copy link
Collaborator

@kylebaron kylebaron commented Aug 24, 2023

See #1112 reported by @rfaelens

No need to look for leading whitespace

x <- "    F_ABS_RAPID_FORM2"
regmatches(x, regexpr("(ALAG|F|R|D)\\_[^= ]+", x, perl=TRUE))
#> [1] "F_ABS_RAPID_FORM2"

Created on 2023-08-24 with reprex v2.0.2

@kylebaron kylebaron changed the base branch from main to release/1.2.0 August 24, 2023 22:16
@kylebaron kylebaron modified the milestone: Next Version Nov 4, 2023
@kylebaron kylebaron linked an issue Nov 4, 2023 that may be closed by this pull request
@kylebaron kylebaron requested a review from kyleam November 4, 2023 17:12
Copy link
Contributor

@kyleam kyleam left a comment

Choose a reason for hiding this comment

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

Fix and regression test look good. Confirmed that this fixes the second snippet posted at gh-1112.

changed the base branch from main to release/1.2.0 3 months ago

Did you forget to switch the base back to main? The release/1.2.0 branch was merged back in 3624f2f (Merge pull request #1111 from metrumresearchgroup/release/1.2.0, 2023-09-19).

@kylebaron
Copy link
Collaborator Author

Thanks, @kyleam; yes, will update the base.

@kylebaron kylebaron changed the base branch from release/1.2.0 to main November 6, 2023 16:28
@kylebaron kylebaron marked this pull request as ready for review November 6, 2023 16:28
@kylebaron kylebaron merged commit d128f07 into main Nov 6, 2023
@kylebaron kylebaron deleted the fix-dosing-cmt branch November 6, 2023 16:28
@kylebaron kylebaron mentioned this pull request Dec 2, 2023
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.

Compartment names with _ are incompatible with D_, F_ and R_
2 participants