Quantcast
Channel: Mendix Forum Questions
Viewing all articles
Browse latest Browse all 81210

What is the best way to get numbers from strings?

$
0
0

Hi all

 

I have a single address sentence with housenumber in it, i want to capture just the number(s) in it. What is the best way to do this?

 

Example: Streetname 14 City

 

What I thought was:

a) replace all leters with '' and trim it after it, and parse it to integer? Should I do this by using a regex [A-Za-z] for it?

b) find just the numbers consisting from 1,2 or 3 non alphatic characters 0-9?


Viewing all articles
Browse latest Browse all 81210

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>