Listing all files whose names match a simple pattern.
Looking at "
questions/4845125/regex-to- match-filename-containing-a- word-regardless-of-case
I was able to get "to work in R though I lost the case insensitivity. I think including the "^." ensures that only files in the current directory, not subdirectory are matched but I am not sure.
"manicon.png" "handicon.png" "bookicon.png"
Looking at the original entry we can see that what was causing us problems was the attempt to escape the "^" which does not need to be escaped in R.
Before looking at another example lets modify the previous command slightly to show how we can make it match differently.
There are a lot of resources available for regex since it is really its own text matching language supported by many different programming languages. A good introductory guide can be found: