How to determine if string cotain one group o digits on the end of it : currently I am struggling with an address normalization problem. At the beggining, ul = street. In my country in most scenario occurs streets with format like "ul. Marii Skłodowskiej-Curie" without number on the end of street but in specific situation occurs streets like "ul. Dywizjonu 303" where 303 is not a house number.

I have an address dictionary whereby I need to check if street exists. First example is pretty easy to validate because i will remove all digits from the end of string and compare result string with dictionary but on the other hand in second example if I will remove all digits from the end of string i will get "ul. Dywizjonu" without 303 which is integrated with street in normal way.

My question is, is it possible to rid off redundant digits and characters from the end of string and get last pair or single digit from string:

For instance:

"ul. Warszawska 150 12/45" -> separated result 150 and ul. Warszawska

"ul. Warszawska 17/19" -> separated result 17 and ul. Warszawska

"ul. Lipca 80r. 90" -> separated result 90 and ul. Lipca 80r.

"ul. Warszawska 14 10/120/2b" -> separated result 14 and ul. Warszawska

Currently I removed all redundant multi whitespaces from string and splitted by whitespace but i completely don't know what I suppose to do next to get a desirable result like above.

Thank you in advance for all your help.