From d6e1c11154627025caf3a8b0368945be1f124e28 Mon Sep 17 00:00:00 2001 From: "Andrew G. Brown" Date: Wed, 25 Oct 2023 16:50:01 -0700 Subject: [PATCH] add support for single digit pH - not super common, but possible --- R/parseOSD_functions.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/parseOSD_functions.R b/R/parseOSD_functions.R index 7c2a7aadb4..770befad48 100644 --- a/R/parseOSD_functions.R +++ b/R/parseOSD_functions.R @@ -168,7 +168,7 @@ .parse_pH <- function(text) { # combine into capturing REGEX - ph.regex <- '\\(ph\\s?([0-9]\\.[0-9])\\)' + ph.regex <- '\\(ph\\s?([0-9]\\.?[0-9]?)\\)' # get matches m <- stringi::stri_match(text, regex = ph.regex, mode = 'first', opts_regex = list(case_insensitive = TRUE))