Jack Bush wrote:Can anyone help identify why the regex below is not able to pickup a simple string...
Jack Bush wrote:Hi D. Ogranos,
Thanks for offering your assistance.
I want to extract every line that meet the following criteria in the order from left to right, such as the original example posted earlier:
Yes, the current regex is ugly due to my lack of experience with writing regex, hence it is far from up to scratch. That is why I need your help.
Thanks for your patience & understanding,
Jack
Jack Bush wrote:I want to extract every line that meet the following criteria in the order from left to right, such as the original example posted earlier:
String line = “South Yarra 5/106 Toorak Rd W 2 br "u" $566,263 SP HS South Yarra”
( i ) Starts with district name that can be up to 3 words starting with capital letter. e.g. South Yarra or Brighton-Le-Sands....
Yes, the current regex is ugly due to my lack of experience with writing regex, hence it is far from up to scratch. That is why I need your help.
Henry Wong wrote:
Create the super regex -- but don't do it by hand. Have the program build the super regex programmatically
D. Ogranos wrote on line 5 of match():
5. pos = m.find(pos) ? m.end() : -1;
It tries to find a match for each pattern in the array, and makes sure to start with each part regex after the end of the last one.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |