Page 1 of 1

PO Box Patterns

Posted: Thu Dec 01, 2011 12:15 pm
by lg777
I need help with PO Box searches. Any combination of P.O. Box, PO BOX, P O Box, etc...

I tried some perl patterns I found on the internet and they don't work in Textpipe so maybe there's a better Easy Pattern method.

What I'm trying to do is look at an address field and if I see any mention of post office box as described above, I want to remove it.

Re: PO Box Patterns

Posted: Fri Dec 02, 2011 12:03 pm
by DataMystic Support
Can you paste the examples you found? There might be an easy fix.

A simple EasyPattern would be:

Code: Select all

[ ('P O' or 'PO' or 'P.O.' or 'P.O' ), ' Box' ]

Re: PO Box Patterns

Posted: Tue Dec 13, 2011 3:18 am
by DFH
Methinks the suggested EasyPattern doesn't cover the uppercase "BOX".

Re: PO Box Patterns

Posted: Tue Dec 13, 2011 9:00 am
by DataMystic Support
You're right David - normally you would not check the Match Case option, and just let TextPipe do its thing.

But in this case it is important to ignore false positives, so Match Case should be checked, and the EasyPattern changed to:

Code: Select all

[ ('P O' or 'PO' or 'P.O.' or 'P.O' ), 1+whitespace, ( 'Box' or 'BOX' ) ]