Find string
Moderator: DosItHelp
-
- Posts: 1
- Joined: 12 Apr 2016 16:06
Find string
How do I find a string in a text file and set it to a variable in the batch file
Re: Find string
Nigel1969edwards wrote:How do I find a string in a text file and set it to a variable in the batch file
When I read your question I wondered what the batch file would be good for? Obviously you already know the string (otherwise you wouldn't know what you are searching in the text file). What am I missing?
Regards
aGerman
-
- Expert
- Posts: 1166
- Joined: 06 Sep 2013 21:28
- Location: Virginia, United States
Re: Find string
aGerman wrote:Nigel1969edwards wrote:How do I find a string in a text file and set it to a variable in the batch file
When I read your question I wondered what the batch file would be good for? Obviously you already know the string (otherwise you wouldn't know what you are searching in the text file). What am I missing?
Regards
aGerman
Perhaps he's looking for some sort of regex matching, like grep -o?
Re: Find string
The OP hasn't returned since he posted in almost two days - more likely to have been a student asking an assignment question on fifteen different tech forums. ![Wink ;)](./images/smilies/icon_wink.gif)
![Wink ;)](./images/smilies/icon_wink.gif)