regex - What is the regular expression that matches the word 'Coal'? -
regex - What is the regular expression that matches the word 'Coal'? -
i'm using grep command in r find occurrences of word coal in column of info frame. coal can occur anywhere in value. example, coal combustion valid value. regular look this?
i've tried using:
grep("[:coal:]", nei[,5]) but not give me right answers.
any help appreciated.
try
grep("\\bcoal\\b", nei[,5]) the \b part matches word boundaries "coal" can't touching other letters.
regex r grep
Comments
Post a Comment