rachelk
07-31-2009, 05:21 AM
I'm a beginner at this so I apologize in advance!
I'm trying to search for a specific word in a text file which has lines like this:
first sentence
second sentence
sentence sentence
I only want to search for the first word of every line though, so if I search for "sentence" I only want the 3rd line to be outputted, although the first two have "sentence" in them as it's not the first word.. I'm wondering if this is possible?
Thanks in advance.
I'm trying to search for a specific word in a text file which has lines like this:
first sentence
second sentence
sentence sentence
I only want to search for the first word of every line though, so if I search for "sentence" I only want the 3rd line to be outputted, although the first two have "sentence" in them as it's not the first word.. I'm wondering if this is possible?
Thanks in advance.