Q:

Extract values from a string using regex

String - try the Club for 1 Dollar
I am trying to get 3 values from the string :
quantity - try the
metal - Club
value - Dollar
but I am getting lub for metal.
Regex I tried : 
(?<quantity>[\s\S]*?)[A-Z](?<metal>[\S]*?)\sfor\s(?<value>[\d]+?)\sDollar

I am not able to correct the regex. Can anybody help me with this?

A:

This [A-Z] is matching C. Change it to (?=[A-Z]) 
(?<quantity>[\s\S]*?)(?=[A-Z])(?<metal>[\S]*?)\sfor\s(?<value>[\d]+?)\sDollar 
Output:  
 **  Grp 0            -  ( pos 0 , len 25 ) 
try the Club for 1 Dollar  
 **  Grp 1 [quantity] -  ( pos 0 , len 8 ) 
try the   
 **  Grp 2 [metal]    -  ( pos 8 , len 4 ) 
Club  
 **  Grp 3 [value]    -  ( pos 17 , len 1 ) 
1  

