Hoolio/Aaron --
Wow! I figured there was a more efficient way, but two lines is great! Works very well, thanks.
Antony --
Thanks for your comments. I'm certainly no expert on http, but apparently devices that insert x-forwarded-for headers (such as the F5) always just append a new one at the end, regardless of how many are already there. In our case, the request may come in via an Akamai server and then go through our F5, and each of those devices puts in its own x-forwarded-for header, so your code above would not work for us because you assume that there is only one.
Wayne