I need to write a regular expression which will filter education qualifications of people from a particular file. 

For example :

```
B.Tech B.Com M.S S.S.C

```

I have been trying with the following code

```
if(strlen($data<=6))
{
  $regexp="/^[A-Za-z\.]$/";
  if(preg_match($regexp,$data))
  {
    echo 'Education = ' . $data .'<br />';
  }
}

```

But I only get the last dot and the character after it.