I have these strings in a folder. Assume there are other similar files in this folder.
[3] "/farm/chickens_industrial_meat_location_df.csv"
[4] "farm/goats_grassland_meat_location_df.csv"
I am trying to extract the files with string location_df while excluding the files with the string chickens & location_df.
I thought I could do this by typing: list.files(pattern = "location_df(?<!(chickens))"
My understanding is that using a negative lookaround would remove strings that have chickens. What am I not understanding about regex here and what is the solution to my problem.