Reply To: Spell out state abbreviations

#61309

@Jongware

Nice little script which I used on a set of business card templates that needed to go from full state names to abbreviations. I ran into an edge case however. Washington D.C. How to tell the difference?

Since the script uses grep it might be possible to do a look ahead to check for the letters D.C. or District of Columbia, I don’t know if this can be accomplished using scripting. It might be possible to do a look ahead for the postal/zip code, in fact, this would be generally useful because using postal abbrevations are usually only relevant for the state name when it is in an address block. I simply did a normal find and replace and corrected the Washingtons by hand. In any case using the script was still much quicker than 52 find and replaces.

This article was last modified on December 27, 2011

Comments (0)

Loading comments...