I have a address field that I want to separate in street name and house-number suffix, first part of address (street-name) is not a problem but the second part for the house-number suffix is a bit tricky.
In bold is the part that I want to select:
- 1st street 25
- 1st street 25 a
- 1st street 25b
- 1st street 25-ab
And this is the regex code that I use in c# to output only the house number suffix, but so far no luck selecting the bold parts:
{
string sNum = AdField;
string sRep = @"\s(\d[^\s]*[ A-Z]\w*)?(\d\w\s)\s?(.+)";
string output = Regex.Match(sNum, sRep).Value;
return output;
}