# coding=utf8
# the above tag defines encoding for this document and is for Python 2.x compatibility
import re
regex = r"\s+(?:ST|DR|AVE|TRL|BLVD|LN|CT|RD|CV|CMNS|CRK|XING|SQ|CRST|LNDG|LOOP|OVAL|ROW|TER|TRCE)\b.*"
test_str = ("505 BLACKBERRY\n"
"135 BEARDSLEY ST\n"
"15 HUNT CLUB DR\n"
"1223 STATE ROUTE 103\n"
"455 STATE RTE 43\n"
"206 COUNTY RD 4710\n"
"17 E 250TH ST\n"
"158 BALLINGER AVE SE\n"
"150 BALLINGER AVE S\n"
"18 BALLINGER AVE T\n"
"1272 ORANGE SUN TRL\n"
"291 S MORELAND BLVD\n"
"615 RUSSET WOOD LN\n"
"1165 MORROCCO CT\n"
"1321 S PKWY DR\n"
"250 COUNTY RD 25A S\n"
"22 SANSTONE RIDGE WAY\n"
"55070 MENDOZA TRL\n"
"1609 HUNTSMERE AVE DOWN\n"
"243 MISTY WOODS CV S\n"
"2292 BAYBERRY CMNS\n"
"16 KILDEER CRK\n"
"40 BEDFORD XING\n"
"4 LEXINGTON SQ\n"
"113 SPARROWS CRST\n"
"1082 MATHOM LNDG\n"
"1050 WILLOW RIDGE LOOP\n"
"660 REDTOP LOOP\n"
"8 MOUNT ROYAL LOOP\n"
"805 SIERRA OVAL\n"
"3012 NANTUCKET ROW\n"
"6 WOODROW AVE\n"
"943 DARROW PARK DR\n"
"743 BELVEDERE TER\n"
"189 WINCHESTER RD\n"
"19 WHITE OAK TRCE\n"
"890 BLACKJACK RD EXT\n"
"767 N EXCALIBUR DR\n"
"109 VININGS FOREST LN SE\n"
"508 E 141ST ST\n"
"85 ROSE LN ST SW")
subst = ""
# You can manually specify the number of replacements by changing the 4th argument
result = re.sub(regex, subst, test_str, 0, re.MULTILINE)
if result:
print (result)
# Note: for Python 2.7 compatibility, use ur"" to prefix the regex and u"" to prefix the test string and substitution.
Please keep in mind that these code samples are automatically generated and are not guaranteed to work. If you find any syntax errors, feel free to submit a bug report. For a full regex reference for Python, please visit: https://docs.python.org/3/library/re.html