grepDouble function

Pattern matching.