in reply to Regex and splitting
Either split first and match just the IP part, or remove the $ from the end of your regular expression. The $ matches the end of the line so the total match fails because there is stuff after the IP number.