Jenny,
Here are the results from the expression I posted. They appear to be working in the example you gave.
Here it is, thanks, Jenny
Building (?i)\b(building\.?|bldg\.?)\b TRUE Floor (?i)\b(floor\.?|fl\.?)\b TRUE Level (?i)\b(level\.?|lvl\.?|lev\.?)\b TRUE Lot (?i)\b(lot\.?|lt\.?)\b TRUE Room (?i)\b(room\.?|rm\.?)\b TRUE Suite (?i)\b(suite\.?|ste\.?)\b TRUE Unit (?i)\b(unit\.?|u\.?)\b TRUE , , TRUE Avenue (?i)(?<= )(avnue\.?$|avnue\.?(?=,)|avnue\.?(?= #)|avn\.?$|avn\.?(?=,)|avn\.?(?= #)|avenue\.?$|avenue\.?(?=,)|avenue\.?(?= #)|avenu\.?$|avenu\.?(?=,)|avenu\.?(?= #)|aven\.?$|aven\.?(?=,)|aven\.?(?= #)|ave\.?$|ave\.?(?=,)|ave\.?(?= #)|av\.?$|av\.?(?=,)|av\.?(?= #)) TRUE Boulevard (?i)(?<= )(boulv\.?$|boulv\.?(?=,)|boulv\.?(?= #)|boulevard\.?$|boulevard\.?(?=,)|boulevard\.?(?= #)|boul\.?$|boul\.?(?=,)|boul\.?(?= #)|blvd\.?$|blvd\.?(?=,)|blvd\.?(?= #)) TRUE Circle (?i)(?<= )(crcle\.?$|crcle\.?(?=,)|crcle\.?(?= #)|crcl\.?$|crcl\.?(?=,)|crcl\.?(?= #)|circle\.?$|circle\.?(?=,)|circle\.?(?= #)|circl\.?$|circl\.?(?=,)|circl\.?(?= #)|circ\.?$|circ\.?(?=,)|circ\.?(?= #)|cir\.?$|cir\.?(?=,)|cir\.?(?= #)) TRUE Court (?i)(?<= )(ct\.?$|ct\.?(?=,)|ct\.?(?= #)|crt\.?$|crt\.?(?=,)|crt\.?(?= #)|court\.?$|court\.?(?=,)|court\.?(?= #)) TRUE Crescent (?i)(?<= )(cres\.?$|cres\.?(?=,)|cres\.?(?= #)|cr\.?$|cr\.?(?=,)|cr\.?(?= #)|crscnt\.?$|crscnt\.?(?=,)|crscnt\.?(?= #)|cresent\.?$|cresent\.?(?=,)|cresent\.?(?= #)|crescent\.?$|crescent\.?(?=,)|crescent\.?(?= #)|cres\.?$|cres\.?(?=,)|cres\.?(?= #)|crecent\.?$|crecent\.?(?=,)|crecent\.?(?= #)) TRUE Drive (?i)(?<= )(drv\.?$|drv\.?(?=,)|drv\.?(?= #)|drive\.?$|drive\.?(?=,)|drive\.?(?= #)|driv\.?$|driv\.?(?=,)|driv\.?(?= #)|dr\.?$|dr\.?(?=,)|dr\.?(?= #)) TRUE Estate (?i)(?<= )(estate\.?$|estate\.?(?=,)|estate\.?(?= #)|est\.?$|est\.?(?=,)|est\.?(?= #)) TRUE Estates (?i)(?<= )(ests\.?$|ests\.?(?=,)|ests\.?(?= #)|estates\.?$|estates\.?(?=,)|estates\.?(?= #)) TRUE Gardens (?i)(?<= )(grdns\.?$|grdns\.?(?=,)|grdns\.?(?= #)|gdns\.?$|gdns\.?(?=,)|gdns\.?(?= #)|gardens\.?$|gardens\.?(?=,)|gardens\.?(?= #)) TRUE Heights (?i)(?<= )(hts\.?$|hts\.?(?=,)|hts\.?(?= #)|ht\.?$|ht\.?(?=,)|ht\.?(?= #)|hgts\.?$|hgts\.?(?=,)|hgts\.?(?= #)|heights\.?$|heights\.?(?=,)|heights\.?(?= #)|height\.?$|height\.?(?=,)|height\.?(?= #)) TRUE Lane (?i)(?<= )(ln\.?$|ln\.?(?=,)|ln\.?(?= #)|lanes\.?$|lanes\.?(?=,)|lanes\.?(?= #)|lane\.?$|lane\.?(?=,)|lane\.?(?= #)|la\.?$|la\.?(?=,)|la\.?(?= #)) TRUE Place (?i)(?<= )(place\.?$|place\.?(?=,)|place\.?(?= #)|pl\.?$|pl\.?(?=,)|pl\.?(?= #)) TRUE Road (?i)(?<= )(road\.?$|road\.?(?=,)|road\.?(?= #)|rd\.?$|rd\.?(?=,)|rd\.?(?= #)) TRUE Roads (?i)(?<= )(roads\.?$|roads\.?(?=,)|roads\.?(?= #)|rds\.?$|rds\.?(?=,)|rds\.?(?= #)) TRUE Street (?i)(?<= )(strt\.?$|strt\.?(?=,)|strt\.?(?= #)|street\.?$|street\.?(?=,)|street\.?(?= #)|str\.?$|str\.?(?=,)|str\.?(?= #)|st\.?$|st\.?(?=,)|st\.?(?= #)) TRUE Streets (?i)(?<= )(streets\.?$|streets\.?(?=,)|streets\.?(?= #)) TRUE Terrace (?i)(?<= )(tce\.?$|tce\.?(?=,)|tce\.?(?= #)|terr\.?$|terr\.?(?=,)|terr\.?(?= #)|ter\.?$|ter\.?(?=,)|ter\.?(?= #)) TRUE \. TRUE \, TRUE PO Box (?i)\b((P\.O\.)|(P\. O\.)|(PO BOX)|(POBOX)|(BOX)|(POB)|(P O BOX))\b
Thanks very much Nick! Have deleted the "blank" entry and it all works now. Your patience is appreciated by this RegEx newbie.
Jenny
Posted By Rhonda Derrick on 02 Jul 2014 01:46 PM
I'm having trouble getting my dictionary to convert Ave. to Avenue or St. to Street. It is leaving in the period. I am not a programmer so I don't know what to look for :)
Greeting - I am trying to re-create the long abbreviations from the posted excel spreadsheet and am having some difficulties. When I test the expression, for example st and I click on the test button I get st
Below is the expression I have. I get this same issue for all others as well. Thanks ahead of time.
(?i)(?<= )(strt\.?$|strt\.?(?=,)|strt\.?(?= #)|street\.?$|street\.?(?=,)|street\.?(?= #)|str\.?$|str\.?(?=,)|str\.?(?= #)|st\.?$|st\.?(?=,)|st\.?(?= #))
NEVER MIND - I WAS HAVING A "DUH" moment - it's Friday, happy weekend.
Greeting! If anyone can help - I have set up a dictionary using the long address file that was posted; the use regular expressions button is checked and we are on version 2.7.1.6 - it was working since I create the dictionary several months ago, but it stopped working recently. If I try to test it, the incoming text does not change after clicking Test. It wasn't working before we installed the latest version of IOM, but I'm not sure if it stopped working after the version prior. Any ideas? Thanks ahead of time.
Marcy Mirkin
Director of Operations
AFMDA
mmirkin@afmda.org
Patrick Thomas
1 person has this question