Separate string with variable number of characters

Hi all,

Do you think there is a clever way to separate a string like “69006 LYON 6EME (69386)” into the postal code, name of the city etc…

Knowing that it should also work for “75008 PARIS 8 (75108)” for example.
The “get text” do not permit to get the information separatly.

Thanks a lot

If the format is fixed,

then you can use string.split with space

Hope it helps

thanks

1 Like

Hi @Pierre_PARIS,

Using split we can able to do this

StrData = “69006 LYON 6EME (69386)”

StrData.ToString.Split(" "C)(0)

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.