I have a textfile that consists of multiple blocks such as one shown here :
TestVar 00000000 WWWWWW 222.222 222.222 222.222 UNKNOWN ,,,,,,,, ,,,,,, ,,,,,, I would like to get the folowing output: Each part is always 8 characters long (e.g TestVar , 00000000) From each line that start with testvar i would like the code to return:
WWWWWW_00000000 Can someone help me with this I have used regex before but never with python and am quite new to both of them.
Thanks