My dilemma is that I'm working with a file that has three different data records plus the header and trailer.  The record type is in positions 21-23.  The header and trailer have spaces in positions 1-20.  The data records have a variable data in positions 1-20. I tried to use pattern matching in the leading data field however that field is treated as a literal string for matching.

Header Row                             000

Data Row 001       139459911           001

Data Row 002       139459911           002

Data Row 003       139459911           003

Data Row 001       139459044           001

Data Row 002       139459044           002

Data Row 003       139459044           003

Trailer Row                            999

Does anyone have any thoughts?