Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have following string values, I want to pull out only first numeric values from it.
1hhhkhkk
2hihihho
12jkjljlj45
22liyuoiuiou3
121hh56khjh
Expected output - 1,2,12,22,121
Kindly help
Regards,
Mahamed
Olá,
Tenta utilizar a função abaixo:
KeepChar(campo,'0123456789')
Obs: o nome campo é o nome que dei a tabela para usar como exemplo
Hi Mathews,
I have numbers in between the string as well..
ex - 1hhjhhj43hkhkj
4dasds987hkj
In this case it s returning all the numeric from the string but we need only first numeric values from string...
Left(YourField,FindOneOf(YourField,'abcdefghijklmnopqrstuvwxyz')-1)
Note that if your text can include other characters, or uppercase, you'll need to add those to the FindOneOf section.
Hi Champion
I can see your solution is partially correct.
I have single value as 0(zero) in the list so for zeros it is not working.
There are no values of zero for any of your sample values. This precisely matches your expected output:
Olá, mahamedfaijan
Utilizei a expressão a expressão fornecida pelo Champion, e funciona muito bem.
Caso atenda sua expectativa marque a resposta do Champion como solução para finalizar sua questão.
Grato!