This is the text file we need to extract the particular string from the text file using python or pandas Single quotes are present in that string
>>>>>>>>>>>>
[fgh: hello how r u 'Output Port 1' of 'abcd/cdf' at the home]
[bsdfglsdgjh flgdfhgdfgh]
[fgh: mzjdhxl sldhvlk hvljhxv 'name1']
[bsdfglsdgjh flgdfhgdfgh]
---
[fgh: hello how r u 'Output Port 1' of 'cdf/abc' at the home]
[bsdfglsdgjh flgdfhgdfgh]
[fgh: mzjdhxl sldhvlk hvljhxv 'name2']
[bsdfglsdgjh flgdfhgdfgh]
---
[fgh: hello how r u 'Output Port 1' of 'xyz/pmn' at the home]
[bsdfglsdgjh flgdfhgdfgh]
[fgh: mzjdhxl sldhvlk hvljhxv 'name3']
[bsdfglsdgjh flgdfhgdfgh]
The output should be
name1 : abcd/cdf
name2 : cdf/abc
name3 : xyz/pmn