title: check IP address by using function
body: <p>I can run this in cmd window, but facing problem when write it in function.</p>
  
  <p>checkIP.m</p>
  
  <pre><code>function feature1 = checkIP(data)
  
  %data = importdata('DATA/URL/testing_URL')
  
  domain_URL = regexp(data,'\w*://[^/]*','match','once');
  IPs = regexp(domain_URL,'(?&lt;=//)(?&lt;=//)(\d{1,3}.\d{1,3}.\d{1,3}.\d{1,3})','match','once');
  
  feature1_data = (~cellfun(@isempty,IPs))
  feature1(feature1_data~=0)=1;
  feature1(feature1_data==0)=-1
  end
  </code></pre>
  
  <p>all.m</p>
  
  <pre><code>data = 'http://123.456.789.123/stackoverflow.com/questions/23245757/create-and-call-function';
  feature1 = checkIP(data)
  </code></pre>