help_stuck
New Member
- Joined
- Aug 24, 2017
- Messages
- 6
I'm trying to take a list of addresses and standardize them using a macro. Basically it's a bunch of replace commands at this point, but I'm having trouble with street names that contain the words I'm trying to abbreviate.
For example, I'm abbreviating East as E, but there are streets named Eastwood Lane, etc. The replace is catching that and changing it to Ewood. For words that finish a street name, like the road in Railroad, I've fixed it by putting a space before Road in the replace command, but I can't figure out what to do to catch the words at the beginning of street names. I could use "East ", but the problem there is that a lot of street names are formatted as "123 Main St East", with no space after East.
Is there a command that can direct the replace to only replace the word if it is not touching any other letters?
Here are a couple sample addresses:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 COUCH AVENUE EAST[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 EAST PROMENADE ST[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 EASTLAND DR[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
For example, I'm abbreviating East as E, but there are streets named Eastwood Lane, etc. The replace is catching that and changing it to Ewood. For words that finish a street name, like the road in Railroad, I've fixed it by putting a space before Road in the replace command, but I can't figure out what to do to catch the words at the beginning of street names. I could use "East ", but the problem there is that a lot of street names are formatted as "123 Main St East", with no space after East.
Is there a command that can direct the replace to only replace the word if it is not touching any other letters?
Here are a couple sample addresses:
[TABLE="class: grid, width: 500, align: center"]
<tbody>[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 COUCH AVENUE EAST[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 EAST PROMENADE ST[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
[TR]
[TD][TABLE="width: 165"]
<tbody>[TR]
[TD]100 EASTLAND DR[/TD]
[/TR]
</tbody><colgroup><col></colgroup>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]