The regular expression way:
>>> import re
>>> s = "Name: Brenden Walski"
>>> re.findall(r'^Name:(.*?)$', s)[0]
' Brenden Walski'
The regular expression is ^Name:(.*?)$
, which means:
^
= "start of line"
Name:
= the literal string "Name:"
(.*?)
= "everything" - the () turns it in a capturing group, which means the match is returned
$
= "end of line"
The long way of saying it is "The start of line, followed by the characters "Name:", then followed by one or more of any printable character, followed by the end of line"
The "other" way:
>>> s.split(':')[1]
' Brenden Walski'
The "other" way, when the name might include a :
:
>>> s[s.find(':')+1:]
' Brenden Walker: Jr'