Well I'm writing this yet again because it signed me out when I went to post it, but anyhow, I am new to Java and am trying to use regex to extract an IP from a header but seems the more I read the more confused I'm getting. If someone could take a moment to post an example of how to extract a IP (127.0.0.1 for example) from a string and than print it so I could look it over and get a better understanding I would be very thankful. I've spent a fair amount of time reading various regex pages with no luck. I would really appreciate it. It's not the regex itself that confuses me it's actually implementing it to do this.

