metrumresearchgroup / mrgsolve

Simulate from ODE-based population PK/PD and QSP models in R
https://mrgsolve.org
GNU General Public License v2.0
131 stars 36 forks source link

Fix regex for detecting dosing compartments #1113

Closed kylebaron closed 1 year ago

kylebaron commented 1 year ago

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 commented 1 year ago

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