(imported comment written by PatNOregon)
Some good tips in this post but I need something just a bit different.
I need to search a file to check two things.
1) that it has a specific string in it
2) and whether or not that line with the string in it starts with a # or not.
I need to check whether or not this particular item is commented out and unfortunately since the entire line string is not consistant, I cant check for an exact match with the # in front, so I'm stuck trying to make this like a wildcard lookup.
Some thing like lines starting with "#" and contains ""