I have the following df
A B
"Axon guidance" 1
"Chemical carcinogenesis - reactive oxygen species" 2
"Electron Transport Chain (OXPHOS system in mitochondria)" 3
"The citric acid (TCA) cycle and respiratory electron transport" 4
Using
grep(paste0("^", df[3,1], "$"), df[,1]))
Gives 0
Using
grep(paste0("^", df[2,1], "$"), df[,1]))
Finds the exact match (integer which is the line containing the match)
Why grep can't get an exact match when using with strings that contains parentheses?