RATPFINK 3 Posted July 3, 2012 Report Share Posted July 3, 2012 (edited) How would I remove items from a list like this that do not contain an address? I have tried a loop through list total and if commoand find regex but I cannot get it to loop. It must be my regex which is:^\b\d+\s\w+\s\w+\b$as well as \d{1,3}.?\d{0,3}\s[a-zA-Z]{2,30}\s[a-zA-Z]{2,15} Homes9 Merilane1712 Mount Curve Avenue4830 N Fremont Avenue N5020 Blake Road2505 E Lake Of The Isles Parkway4805 Bywood Street W3209 Galleria Unit: 18088 Park Lane4913 Rolling Green Parkway4924 Green Farms Circle4700 Annaway Drive5 Spur Road4218 Fremont Avenue S2104 Kenwood Parkway4612 Edgebrook Place14 Bello Drive1903 Mount Curve Avenue6708 Cheyenne Trail1324 Mount Curve Avenue1600 Mount Curve Avenue2232 W Lake Of The Isles Parkway7432 Shannon Drive72 Groveland Terrace31 Cooper Circle7333 Auto Club Road2544 W Lake Of The Isles Parkway1724 Colfax Avenue S301 Kenwood Parkway Unit: 401100 3rd Avenue S Unit: 23013150 Calhoun Parkway W Unit: 5032516 Lake Of The Isles Parkway W2603 Newton Avenue S1715 Dupont Avenue S5200-32 France Avenue S1923 Knox Avenue S3742 W Calhoun Parkway7123 Antrim Court5739 Long Brake Circle10230 28th Avenue N1715 James Avenue S6604 Indian Hills Road4612 Merilane Avenue5800 Hidden Lane5901 Lee Valley Road1315 Mount Curve Avenue4602 Sunnyside Road6936 Valley View Road4256 Linden Hills Boulevard4402 Browndale Avenue5533 Brookview AvenueSendCloseSign UpSubmitSign InCLOSESave Edited July 5, 2012 by RATPFINK Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted July 3, 2012 Report Share Posted July 3, 2012 Use this:clear list(%list1) clear list(%filtered) add list to list(%list1, $list from text("9 Merilane 1712 Mount Curve Avenue 4830 N Fremont Avenue N 5020 Blake Road 2505 E Lake Of The Isles Parkway 4805 Bywood Street W 3209 Galleria Unit: 1808 8 Park Lane 4913 Rolling Green Parkway 4924 Green Farms Circle 4700 Annaway Drive 5 Spur Road 4218 Fremont Avenue S 2104 Kenwood Parkway 4612 Edgebrook Place 14 Bello Drive 1903 Mount Curve Avenue 6708 Cheyenne Trail 1324 Mount Curve Avenue 1600 Mount Curve Avenue 2232 W Lake Of The Isles Parkway 7432 Shannon Drive 72 Groveland Terrace 31 Cooper Circle 7333 Auto Club Road 2544 W Lake Of The Isles Parkway 1724 Colfax Avenue S 301 Kenwood Parkway Unit: 401 100 3rd Avenue S Unit: 2301 3150 Calhoun Parkway W Unit: 503 2516 Lake Of The Isles Parkway W 2603 Newton Avenue S 1715 Dupont Avenue S 5200-32 France Avenue S 1923 Knox Avenue S 3742 W Calhoun Parkway 7123 Antrim Court 5739 Long Brake Circle 10230 28th Avenue N 1715 James Avenue S 6604 Indian Hills Road 4612 Merilane Avenue 5800 Hidden Lane 5901 Lee Valley Road 1315 Mount Curve Avenue 4602 Sunnyside Road 6936 Valley View Road 4256 Linden Hills Boulevard 4402 Browndale Avenue 5533 Brookview Avenue Send Close Sign Up Submit Sign In CLOSE Save ", " "), "Delete", "Global") loop($list total(%list1)) { add item to list(%filtered, $find regular expression($next list item(%list1), "^[0-9].+"), "Delete", "Global") } It will only add to list the item that started with numbers Quote Link to post Share on other sites
Praney Behl 314 Posted July 3, 2012 Report Share Posted July 3, 2012 Good use of Regex. Willywonka. Code in just one node: set(#clean, $find regular expression("9 Merilane 1712 Mount Curve Avenue 4830 N Fremont Avenue N 5020 Blake Road 2505 E Lake Of The Isles Parkway 4805 Bywood Street W 3209 Galleria Unit: 1808 8 Park Lane 4913 Rolling Green Parkway 4924 Green Farms Circle 4700 Annaway Drive 5 Spur Road 4218 Fremont Avenue S 2104 Kenwood Parkway 4612 Edgebrook Place 14 Bello Drive 1903 Mount Curve Avenue 6708 Cheyenne Trail 1324 Mount Curve Avenue 1600 Mount Curve Avenue 2232 W Lake Of The Isles Parkway 7432 Shannon Drive 72 Groveland Terrace 31 Cooper Circle 7333 Auto Club Road 2544 W Lake Of The Isles Parkway 1724 Colfax Avenue S 301 Kenwood Parkway Unit: 401 100 3rd Avenue S Unit: 2301 3150 Calhoun Parkway W Unit: 503 2516 Lake Of The Isles Parkway W 2603 Newton Avenue S 1715 Dupont Avenue S 5200-32 France Avenue S 1923 Knox Avenue S 3742 W Calhoun Parkway 7123 Antrim Court 5739 Long Brake Circle 10230 28th Avenue N 1715 James Avenue S 6604 Indian Hills Road 4612 Merilane Avenue 5800 Hidden Lane 5901 Lee Valley Road 1315 Mount Curve Avenue 4602 Sunnyside Road 6936 Valley View Road 4256 Linden Hills Boulevard 4402 Browndale Avenue 5533 Brookview Avenue Send Close Sign Up Submit Sign In CLOSE", "\\d\{1,4\}.?\\d\{0,4\}\\s[a-zA-Z,0-9]\{1,30\}\\s[a-zA-Z]\{1,15\}[a-zA-Z,0-9]\{1,30\}.*"), "Global") 2 Quote Link to post Share on other sites
Praney Behl 314 Posted July 3, 2012 Report Share Posted July 3, 2012 Glad I could help. I am always looking for better, shorter, and smarter ways Praney Quote Link to post Share on other sites
JohnB 255 Posted July 3, 2012 Report Share Posted July 3, 2012 Hi RATPFINK, if these solutions worked for you, could you tag this "[solved]" in the title? Thank you. john Quote Link to post Share on other sites
RATPFINK 3 Posted July 5, 2012 Author Report Share Posted July 5, 2012 Thank you guys for all the help. I got it working perfectly. Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.