Welcome to the new platform of Programmers Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use it's exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
Need to find and extract words from text file
I know this is done with regular expressions, but I don't know how. I have text file that contains many lines of information. How would I find the line that contains the word "subject:". Then once that line is found how would i get only the text after the colon in to a variable? For example, let say the line is in row 56 and it looks like this: "subject: ORDER CONFIRMATION". How would I find the subject, and how do I get the "ORDER CONFIRMATION". I need to find the subject and only get the subject.