Extract a word from sentence

$SET_PARAMS='-param Run_Type_Parm=Month -param Portfolio_Parm="997" -param From_Date_Parm="2011-08-09"'

Want to extract the value of "Portfolio_Parm" from $SET_PARAMS i.e in the above case "997" & assigned to new variable.
The existence order of "Portfolio"Parm" can change, but the name remains same.

I am new to Unix scripting. Can some one help me to extract the word?

Try this

val=`echo $SET_PARAMS | sed 's/.*Portfolio_Parm="\([0-9]*\)".*/\1/g'`

regards,
Ahamed

Thanks Ahamed it worked!!! I need for Alphanumeric so, used the below code,

val=`echo $SET_PARAMS | sed 's/.*Portfolio_Parm="\([0-9a-zA-Z]*\)".*/\1/g'`