Is there a nice (tested?) way of extracting URLs from an (R)markdown document? I'm trying to avoid writing my own horrible regular expression.
Thanks
Is there a nice (tested?) way of extracting URLs from an (R)markdown document? I'm trying to avoid writing my own horrible regular expression.
Thanks
@csgillespie I don't know of an exact function that can do this. But to avoid a horrible regular expression, you could knit the (R)markdown document to HTML and then extract the anchor tags with rvest.
Thanks for the suggestion. Since I was converting to pdf, I just parsed the LaTeX for \url{} which was relatively straightforward.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.