Skip to content

Commit

Permalink
Merge pull request #32 from bikeactuary/regex_bugfix
Browse files Browse the repository at this point in the history
bugfix: modify the regex to allow dash
  • Loading branch information
mikeasilva authored Mar 29, 2022
2 parents 526cddf + 021f677 commit 8f29d78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/blsAPI.R
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ blsAPI <- function(payload=NA, api_version=1, return_data_frame=FALSE){
if (is.list(payload)){
# Multiple Series or One or More Series, Specifying Years request
payload <- toJSON(payload)
m <- regexpr('\\"seriesid\\":\\"[a-zA-Z0-9]*\\",', payload)
m <- regexpr('\\"seriesid\\":\\"[a-zA-Z0-9-]*\\",', payload)
str <- regmatches(payload, m)
if (length(str) > 0){
# wrap single series in []
Expand Down

0 comments on commit 8f29d78

Please sign in to comment.