Skip to content

Commit

Permalink
add support for single digit pH
Browse files Browse the repository at this point in the history
 - not super common, but possible
  • Loading branch information
brownag committed Oct 25, 2023
1 parent 8720775 commit d6e1c11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/parseOSD_functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit d6e1c11

Please sign in to comment.