cancel
Showing results for 
Search instead for 
Did you mean: 

Finding Numbers in String Expression

Former Member
0 Kudos

Hello Gurus,

Please help me out to find Numbers in the Lastname Field, Means i need to write assignment expression to return TRUE if i find any numbers in the Lastname field. Please Suggest some solution for this.

Ex: Basha056 - > Return TRUE

BASHA -> FALSE

Your help would be highly appreciated

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Write this below Expresson:

IF(HAS_ALL_CHARS(LastName, "A", "z" ), FALSE, TRUE)

It will return if Ex: Basha056 - > Return TRUE

BASHA -> FALSE

Kindly revert with result.

Regards,

Mandeep Saini

Former Member
0 Kudos

Hi Thanks for the immediate response, but lastname may contains space too. Your help would be highly appreciated.

Former Member
0 Kudos

Hi,

Try this below Expression

IF(HAS_ANY_CHARS(LastName, "0", "9"), TRUE, FALSE)

Kindly mark thread as answered if this solves your query.

Regards,

Mandeep Saini

Former Member
0 Kudos

Hi Mandeep, I tried this already, Range is determined by the ASCII chart which includes only uppercase or lowercase letters (no numbers, spaces, punctuation, or special characters) in u201CAu201D-u201CZu201D or u201Cau201D-u201Czu201D ranges. Need to analyze bit more for this. Thanks for your input.

Former Member
0 Kudos

Hi mandeep, Yes it works..sorry i was tring HAS_ALL_CHARS instead of HAS_ANY_CHARS ! Great Work, points awarded.

Former Member
0 Kudos

Hi,

Gr8 to hear it worked, i was wondering otherwise why it is not working at your end if it is working fine at my end.

Regards,

Mandeep Saini

Edited by: Mandeep Singh Saini on Sep 16, 2010 9:15 PM

Answers (0)