When testing a custom web server application, special header (not cookie) is often sent across which is used to keep track of the session id. The only way this interaction is automated within JMeter currently is for the tester to run regex extractor in the first http sampler and extract that session id that's been generated by the server and then embedded in the http response header, then use HTTP Header Manager across the thread which uses the variable that's been associated with the ref name in the regex extractor.
Added to release 2.0 branch
Also added to regex function in 2.0 branch
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/1374