How to find the word before a number and after?

0
Hi all,   What do you advice in order to capture the streetname and cityname in a single string with a dividing number between them as : Streetname 14 Cityname? Is it posisble to find the word before and after a number with a regex/community.commons java action or so ?   A possibility:   1 - remove number 2- and seperate the words by a space...?  
asked
2 answers
1

I would advise against trying to do this. If you really must, export the list to Excel, do this via an Excel macro, and most importantly, have someone confirm that the results are okay before importing the results in your application.

Real world numbers and names never adher to your expectations, so expecting to be able to fully automate this task is silly.

answered
0

Bear in mind Nikel's advice that it might be better to clean your data outside Mendix... If you really want to do this string manipluation in Mendix, you could try the following approach.

In your earlier qiuestion you found how to extract  the number part of your string.  You can then use the find() function to identify where this number occurs in your string, like find('mystring', 'myNbr')

This will return a number giving you the position of your number string.  You can then use length('myNbr'), substring() and trim functions to get the text before and after your number.

answered