Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pranaview
Creator III
Creator III

Remove numbers from the start of a string

Hi Guys,

I need to extract just the letters from a field. I have values such as "30 Seafreight" or "10 truck" or "Seafreight"  or "8 ferry"

Now what I want is to only have "Seafreight", "truck", "ferry". I thought of replacing 30/10/8 with an empty string and then use Trim function but I am not sure maybe in the future we can have a different number in the beginning so that approach doesn't seem right.

What I want is for QV to acknowledge any numbers(if any) in the beginning and just remove it leaving only Mode of transport which then I can map further to get my Lead Time.

Any suggestion will be appreciated as I need to get this done ASAP.

Cheers,

Pranav

Labels (3)
1 Solution

Accepted Solutions
pasi_lehtinen
Partner - Contributor III
Partner - Contributor III

PurgeChar(Field,'1234567890 ')

View solution in original post

3 Replies
pasi_lehtinen
Partner - Contributor III
Partner - Contributor III

PurgeChar(Field,'1234567890 ')

pasi_lehtinen
Partner - Contributor III
Partner - Contributor III

or if you might have some numbers in the end of the string which you might want to keep, then try this:

right(Field, len(Field)-Index(Field, ' ')) 

The above function is assuming that the string has space between the Integer and Text part.

pranaview
Creator III
Creator III
Author

I think PurgeChar() will do it. Thanks a lot!