I'm trying to extract a substring from a string for each row in a column if it matches a specific value. Subsequently I want to add the matched substring to a new column. The substring must match either 'GET', 'POST' or 'HEAD'. The strings are in the following format: 'GET /icons/circle_logo_small.gif'. 
This is my current dataframe

And this the expected dataframe

 
     
    