diff --git a/DESCRIPTION b/DESCRIPTION index 5b6bd6e1a..dceb5f902 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Type: Package Package: insight Title: Easy Access to Model Information for Various Model Objects -Version: 0.19.5.3 +Version: 0.19.5.4 Authors@R: c(person(given = "Daniel", family = "Lüdecke", diff --git a/R/find_terms.R b/R/find_terms.R index eb3fcddb8..d6a11f1e1 100644 --- a/R/find_terms.R +++ b/R/find_terms.R @@ -188,8 +188,10 @@ find_terms.mipo <- function(x, flatten = FALSE, ...) { # protect "-1" f$conditional <- gsub("(-1|- 1)(?![^(]*\\))", "#1", f$conditional, perl = TRUE) + # This regular expression matches any of the characters *, +, :, |, -, or /, + # unless they are preceded by a ^ and followed by a closing parenthesis ). f <- lapply(f, function(.x) { - pattern <- "[*+:|\\-\\/](?![^(]*\\))" # was: "[\\*\\+:\\-\\|/](?![^(]*\\))" + pattern <- "(?