I use http://www.regexper.com to view regular expression icons. I would ideally ideally like:
- send regular expression to site
- open the site with the displayed expression
For example, use the regular expression: "\\s*foo[AZ]\\d{2,3}"
. I went to the site and insert \s*foo[AZ]\d{2,3}
(note the removal of double slashes). And it returns:
![enter image description here](https://fooobar.com//img/d1dbbc49815e6a7a738c79d40a364ccb.png)
I would like to make this process from within R. Creating a wrapper function, for example view_regex("\\s*foo[AZ]\\d{2,3}")
and a page ( http://www.regexper.com/# % 5Cs * foo% 5BA-Z% 5D% 5Cd% 7B2% 2C3% 7D ) with a visual diagram, the default browser opens.
I think RCURL may be appropriate, but for me this is a new territory. I also see the double slash as a problem, because http://www.regexper.com expects single slashes, and R needs to be doubled. I can get R to return one slash to the console using cat
as follows, so this may be the approach.
x <- "\\s*foo[AZ]\\d{2,3}" cat(x) \s*foo[AZ]\d{2,3}
source share