I'm having problems with Regex patterns
<p>I need help with a proxy scraper I am making. My application is throwing an exception for seemingly no reason.</p>

<p>My Code</p>

<pre><code>package com.ElwynDev.PastBinBot;

import java.io.IOException;
import java.util.HashSet;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ProxyScraper {

    public static void ScrapProxy(int Pages) {

        final int[] searchIds = new int[] { 225957, 278235, 240804, 258000, 227364, 244555, 438084, 438085, 438086, 438087, 438088};
        final String searchUrl = "http://www.proxyfire.net/forum/showthread.php?t=56861?";
        final String proxyExtractingRegex = "[1-9]{2,3}.[1-9]{2,3}.[1-9]{2,3}.[1-9]{2,3}";

        Pattern r = Pattern.compile(proxyExtractingRegex);

        HashSet&lt;String&gt; proxyHashSet = new HashSet&lt;String&gt;();
        for(int searchId : searchIds) {
            Matcher m = null;

            try {
                m = r.matcher(ProxyHandle.get(searchUrl + searchId, null, Pages));
                while(true) {
                    if(m.find()){
                        proxyHashSet.add(m.group());
                    }
                    else
                        break;
                }
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
        for(String proxy : proxyHashSet) {
            FileWrighter.logTo("proxy.txt", proxy + "\n");
        }
    }
};
</code></pre>



<pre><code>Exception in thread "main" java.lang.NullPointerException
at java.util.regex.Matcher.getTextLength(Unknown Source)
at java.util.regex.Matcher.reset(Unknown Source)
at java.util.regex.Matcher.&lt;init&gt;(Unknown Source)
at java.util.regex.Pattern.matcher(Unknown Source)
at com.ElwynDev.PastBinBot.ProxyScraper.ScrapProxy(ProxyScraper.java:24)
at com.ElwynDev.PastBinBot.Main.main(Main.java:17)
</code></pre>
