Python 2.7.1 I am trying to use python regular expression to extract words inside of a pattern
I have some string that looks like this
someline abc s
Maybe that's a bit shorter and easier to understand:
import re text = '... someline abc... someother line... name my_user_name is valid.. some more lines' >>> re.search('name (.*) is valid', text).group(1) 'my_user_name'