scholar
scholar copied to clipboard
Get scholar does not work for ids with punctuation
Because you do this:
ids <- stringr::str_extract_all(string = aa, pattern = ";user=[[:alnum:]]+[[:punct:]]")
It will end the regex when it hits any punctuation. That does not work for ids with punctuation, like myself.
Instead do this because ids are 12 characters:
ids <- stringr::str_extract_all(string = aa, pattern = ';user=.{12}')
And then to remove the user part:
ids <- ids %>% unlist %>% gsub(";user=", "", .) %>% unique