I am looking for a way to get all of the letters in a string before a : but I have no idea on where to start. Would I use regex? If so how?
string = \"Userna
You don't need regex for this
regex
>>> s = "Username: How are you today?"
You can use the split method to split the string on the ':' character
split
':'
>>> s.split(':') ['Username', ' How are you today?']
And slice out element [0] to get the first part of the string
[0]
>>> s.split(':')[0] 'Username'