Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Syntactic Confectionery Delight
 
PerlMonks  

Re: Re: Pattern Matching examples

by Anonymous Monk
on Nov 25, 2003 at 00:33 UTC ( [id://309805]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re: Pattern Matching examples
in thread Pattern Matching examples

I'm working on this and I've decided to stop trying to do the xBase part. The reasons are too numerous to list. It's just not getting me anywhere. I'm going to solve this with Perl and some brainpower.I transferred all files to my Linux laptop and turned off my *other* operating system

I have better tools now, I have underestimated the text processing power I have. Anyways, here's my diagram that I've printed out for myself with the fixed positions that I will be using.

1234567890123456789012345678901234567890123456789012345678901234567890 +1234567890123456789012345678901234567890 | | | | | | | + | | | | aaaaaaaaaaaaaaaaa, aaaaaaaaaa aaaaaaaaaaaaa, aaaaaaaaaaaaaa + aaaaaaaaaaaa, aaaaaaaaaaaaaaa bbbbbbbbbbbbbbbbbbbbbbbbbbbbb bbbbbbbbbbbbbbbbbbbbbbbbbbbbb + bbbbbbbbbbbbbbbbbbbbbbbbbbbbb ccccccccccccccccccccccccccccc ccccccccccccccccccccccccccccc + ccccccccccccccccccccccccccccc ddddddddddd ee 99999-9999 dddddddd ee 99999-9999 + dddddddddd ee 99999-9999 | | | | + | | 2 21 39 58 + 75 94

Obviously you need to see the text without word-wrap, but you get the gist of it. The cool thing is that address1(b) and address2(c) can be grabbed as a fixed-length string and then chomped(?) or TRIMed in xBase.

The lastname(a) and firstname(a) fields need to be switched for the purposes of my new output needs.

The city(d) and state(e) can also be grabbed as a string of fixed length because I'm not interested in sorting them here.

Then I can jump directly to the zipcode position and grab 10 characters.

The issue with the intermittent 2nd address will have to wait.

The are *no* spaces between the labels. It's just one messy report.

Step 1: Figure out how to handle each line
Step 2: Learn to play with the array(s)
Step 3: Start picking out data from each line.

Then I'll do the loop and the output text file.

Be back in a few hours (I'd better make more coffee)

RF

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://309805]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.