Method # 1 :
In this method we will use
re.search (pattern, string, flags = 0) . Here, pattern refers to the pattern we want to find. It accepts a string with the following values:
re.search (). . means any character except / n and * expands it to the end of the line. Assign that to the variable name_field .
Method # 2:
To split a string, we will use
Series.str.extract (pat, flags = 0, expand = True) . Here pat refers to the pattern we want to find.