title: date validation using regular expression in pig - getting ERROR 1003: Unable to find an operator for alias
body: <p>I have sampledata.csv which contains data as below,</p>
  
  <p>2,4/1/2010,5.97</p>
  
  <p>2,4/6/2010,12.71</p>
  
  <p>2,4/7/2010,34.52</p>
  
  <p>2,4/12/2010,7.89</p>
  
  <p>2,4/14/2010,17.17</p>
  
  <p>2,4/16/2010,9.25</p>
  
  <p>2,4/19/2010,26.74</p>
  
  <p>I want to filter the data in pig script so that only data with valid date are considered.
  Say if the date is like '4//2010' or '/9/2010', then it has to be filtered out.</p>
  
  <p>Below is the pig script I have written and the output I am getting while dumping the data.</p>
  
  <p>script:</p>
  
  <pre><code>data = load 'sampledata.csv' using PigStorage(',') as (custid:int, date:chararray,amount:float);
  
  cleadata = FILTER data by REGEX_EXTRACT(date, '(([1-9])|(1[0-2]))/(([0-2][1-9])|([3][0-1]))/([1-9]{4})', 1) != null;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>2014-09-14 18:21:30,587 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1003: Unable to find an operator for alias cleandata
  </code></pre>
  
  <p>I am a beginner in pig scripting. If you have come across this kind of error,please let me know how to resolve.</p>