# How to extract Solve results as variables [duplicate]

Possible Duplicate:
Assign the results from a Solve to variable(s)

In the following example:

Clear[g1, z1, a, g2, z2]
sa = Solve[ g1 == 1 + l z1/(z1^2 + a), a]
sb = Solve[ g2 == 1 - l z2/(z2^2 + b), b] /. z2 -> z1 + l


This gives me solutions for a and b that are in the form

{{ a -> astuff }}
{{ b -> bstuff }}


I want to use this result in a secondary computation, and did so by cut and pasting from the Solve[] results like so

 Solve[ astuff == bstuff, z1 ]


How can I just extract those results without cut and pasting? I don't like the cut and paste dependency since I'd have to redo it all if I make any sort of correction to the first couple identities.

-

## marked as duplicate by Jens, Artes, Ajasja, Mr.Wizard♦Dec 15 '12 at 20:46

You can use Part to extract the relevant bits. –  b.gatessucks Dec 15 '12 at 20:06

You could use ReplaceAll (/.):
Clear[g1, z1, a, g2, z2]