How do I form a regular expression to extract variables from a string which are of the format ${variable name}
Lets say I have a string like this :
hello ${ person } welcome to ${ university name}. you are enrolled in ${class}
and I need to extract these from the string
person ,
university name ,
class