Hello Users,
I have a requirement to find the index of the first Alpha numeric Character.
Example:
Input: output
,,..Apple 4
&&CAR 2
Thanks in advance
@binuacs - watch out - the non-word character class (\W) also excludes underscores (so your solution wouldn't handle _123, for example). Also, I'm not sure if @npd's requirement needs to handle something like A.B.C, where there are non-alphanumeric characters after the first alphanumeric.
@npd - here's an alternative regex solution. This will return -1 if the string does not contain any alphanumeric characters.
FindString([input], REGEX_Replace([input], '^.*?[A-Za-z\d](.*)', '$1')) - 1
This finds the rest of the string after the first alphanumeric character.