I am trying to replace a specific character in a string, but as this pattern repeats, I decide to replace it with iterative use of RegExes, if possible. For example, consider the link http://www.bbc.co.uk/food/ingredients/by/letter/a
I want to replace the last 'a' with 'b', then 'c', a 'd' and so-on to 'z' iteratively. RegEx to work with this is as simple as:
http:\/\/www\.bbc\.co\.uk\/food\/ingredients\/by\/letter\/[a-z]
this will confirm the line, but I would like to automate the link generation process. I am new to R and I would like to know if something like this is possible.
source
share