I'm trying to check if string(s) are present in a file using the below option: (tried in IRB)
File.readlines("E:/nano/ABC.txt").grep(/Digital/).any?
=> true
gives me true, so string is available but if I check for ids like below
File.readlines("E:/nano/ABC.txt").grep(/ncr\abc_efg_dev/).any?
=> false
or
File.readlines("E:/nano/ABC.txt").grep(/ncr\yui30n/).any?
=> false
it's giving false
and it's unable to identify the string even though it's present in the file. I'm not sure how to check the existence of the strings - 'ncr\jx8go5'
or 'ncr\atxe5t'
ABC.txt
# Digital created on July 2016
# Digital Owner: John Cena (jxcgo)
# Digital access: create delete access
[groups]
first = ncr\abc_efg_dev, ncr\abc_efg_test, ncr\jx8go5, ncr\atxe5t
digital_owner = ncr\yui30n, ncr\bhyrl4