title: Filtering text using sed based on pattern starting with 2 characters and numbers
body: <p>I have a file that keeps changing format but it always contains a pattern that I need to retrieve.</p>
  
  <p>Here are a few lines of the sample file:</p>
  
  <pre><code>1    PL000000002002695895        611         1/11/2013  
  2    PL000000002002785424        359         7/11/2013  
  3.-PL000000002002121651                               11                     DAY 24/11/2013
  4.-PL000000002002343228                               43                     DAY 29/11/2013
  5    PL000000002002232587          NEW   360         30/11/2013
  </code></pre>
  
  <p>I tried using these two commands to filter from the list #3 and #4, but I am still having problem retrieving the other fields.</p>
  
  <p>Here are the commands I used:</p>
  
  <pre><code>awk 'substr($1,4,2) == "PL" {print substr($1,4)}' sample &gt; sample2
  </code></pre>
  
  <p>The  command above does not filter for double digits at the beginning of a line.</p>
  
  <pre><code>awk '{print $1}' sample | sed 's/^[[:digit:]]*\.\-//g' &gt; sample2
  </code></pre>
  
  <p>This one works but only for a special case.</p>
  
  <p>Any help would be greatly appreciate it!</p>