Nov-14-2021, 12:39 AM
I've done a grep search through all these emails and folders. The output is in a file. The data is like this
All I want is the URI, so that I'm left with
I assume in Python, I simply search for the string "https", then remove the data from zero position up to the position where the search has found that string. Looks simple in the example data above. yet many lines in the file have data after the end of the complete URI. I guess a search again to find a blank/space ?
From https://www.w3schools.com/python/ref_string_find.asp an example ..
Quote:family/Smallville, Robert & Mary/28134: Bioelectro healing - https://t.me/bioelectromagnetic_healing
All I want is the URI, so that I'm left with
Quote:https://t.me/bioelectromagnetic_healing
I assume in Python, I simply search for the string "https", then remove the data from zero position up to the position where the search has found that string. Looks simple in the example data above. yet many lines in the file have data after the end of the complete URI. I guess a search again to find a blank/space ?
From https://www.w3schools.com/python/ref_string_find.asp an example ..
txt = "Hello, welcome to my world." x = txt.find("e") print(x)Should I use 'find' or 'search' for this ? No doubt it is just an "open" of the file, then a "for" loop to check for the string.