Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get scholar does not work for ids with punctuation #109

Open
doomlab opened this issue Feb 18, 2022 · 0 comments
Open

Get scholar does not work for ids with punctuation #109

doomlab opened this issue Feb 18, 2022 · 0 comments

Comments

@doomlab
Copy link

doomlab commented Feb 18, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant