I am new to Regex and need some help here.
Existing : MS23 MLC990
Expected: MS23
I want to filter the field contents to ignore the characters after the digit 3. The field contents can be MDDD42 MLC990 but still want to do the same. Hope this is clear. Appreciate the support.
Solved! Go to Solution.
Hi @jmedidi
I would suggest using a string function:
Formula:left([Field1],FindString([Field1], '3')+1)
I would have interpreted this differently, that the user is looking for the first part of the expression (with the '3' referring to the specific example rather than a general requirement). In which case you could edit the formula from @Luke_C to look for a space instead of a 3:
left([Field1],FindString([Field1], ' '))
Thanks all for responding so quick. Basically what i gave is an example and i am looking for a generic solution not confined to digit 3. that is the reason i gave another example in the initial post like MDDD42 MLC990 . There can be space after 2 or no space as well.. Spaces are not relevant here. Hope this is clear.
Hi @jmedidi
Thanks for clarifying, that is very helpful. You can use this regex:
(.*\d+)\s?\u.*
.*= any number of characters
\d+ = one or more digits
\s? = optional space
\u = upper case letter
.* = any number of characters