Search found 3 matches

by stuntmusic
Thu Jun 09, 2011 7:48 pm
Forum: General
Topic: Using TextPad to extract and rewrite flatfiles
Replies: 3
Views: 453

I tried the search and replace method, but TextPad said Cannot find regular expression ^(.{4})(.{5})(.{4})(.{15})(.{5})(.{7})(.{2})(.{5}) \n

I did set the editor to allow for POSIX regular expression syntax. I also restarted TextPad to see if that was the culprit.

I will keep trying. Is the POSIX ...
by stuntmusic
Thu Jun 09, 2011 7:35 pm
Forum: General
Topic: Using TextPad to extract and rewrite flatfiles
Replies: 3
Views: 453

Ben,

The 'fields' are not fixed width. They vary from record to record, and the flat file sometimes uses spaces for a field that is not 'full', sometimes it uses zeros.

I do know the exact field lengths however, so the method you propose above might be exactly what I need.

I will try it and see ...
by stuntmusic
Thu Jun 09, 2011 4:21 pm
Forum: General
Topic: Using TextPad to extract and rewrite flatfiles
Replies: 3
Views: 453

Using TextPad to extract and rewrite flatfiles

I am not sure this is something regex can do or another module within TextPad.

I have a flatfile which has multiple lines in it.

Each line represents a record.

For each record, data is written with xx-xx spaces, for example, first name might be 'contained' in spaces 127-145.

I can move to that ...