I have 200 text files with the following structure:
n01443537_0.JPEG 0 10 63 58 ... n01443537_499.JPEG 0 3 39 42 In every file the first part (before the underscore i.e. n01443537) is different. However, they all have the same structure i.e start with n, followed by eight digits.
I would like to have all 200 files formatted as follows:
n01443537/n01443537_0.JPEG n01443537 ... n01443537/n01443537_499.JPEG n01443537 I found that this regex n[^_]* captures the required pattern, but having a little trouble putting it all together.
' 0 10 63 58')?