antonioking
asked on
return whole line that contains string
I have a text file, I'm creating a batch script that will search the text file for the word "<channels>" and return the entire line as a string.
I then want to trim <channels> and </channels> and any spaces from the string so I'm left with just the value inside the <channels> wrap.
I'd be very grateful for some help!
I then want to trim <channels> and </channels> and any spaces from the string so I'm left with just the value inside the <channels> wrap.
I'd be very grateful for some help!
depending upon whether there is anything else that could be o that line, or if line could split onto two lines I was going to use slightly simpler to use <> as delimeters? Looks like Bill has you an answer anyway though now.
steve
steve
ASKER
I'd like to set trim as variable I can use later in the script.
How would I do that with this script?
I've tried SET AUDIOCHANNELS = %TRIM% but it's always set to nothing.
How would I do that with this script?
I've tried SET AUDIOCHANNELS = %TRIM% but it's always set to nothing.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks, works spot on!
Great, glad that helped, thanks for the feedback.
Open in new window
~bp