I have a set of 1-line .txt files in a directory. They all have the same basic format, which I have pasted below labelled 'input':
For every file in the directory, I would like to remove the string at the beginning and the end so that I only have the text that I am interested in, so that each file looks the 'output':
Input:
<s> Text here that I want to keep </s> (31ca4166c37a_.76)
Output:
Text here that I want to keep
Any help would be greatly appreciated.