RegExp... String.replace(?)

i’m trying to search a string for a particular pattern, and replace it with elements from within the pattern… for example…

here’s the given string…
if you want to learn how to use regexp, {url===http://somesite.com, text===click here}.

the pattern…
{url===http://somesite.com, text===replacement text}

and the intended result…
if you want to learn how to use regexp, click here.

of course, i’ll extract the url and do something else with it… i’m just wondering what the regexp is for that pattern, and how i can extract things from the results returned.

any thoughts?

thanks