Regex to take first letter only

Hello everyone, I am needing help with a regex formula. Essentially I need it to take ONLY the first letter in a middle name and ignore any other spaces, dashes, or periods that may be in it.

Currently I have {{replace(replace(NAME; “/\s/g”; emptystring); “/\B[A-Za-z]+/”; emptystring)}}

What I currently have first removes any spaces, and then all letters except for the first but I cannot seem to get it to work with Dashes or Periods

What I need is for it to remove all characters except for the first letter

So if someone typed a name as
“Tyler James-Matthew Smith” OR
“Tyler James Matthew Smith” OR
“Tyler - James - Matthew - Smith” OR
“T. J. Matthew Smith” ETC.

the result will always be T

Hi, you just need the T ? about the other letters and name you don´t need ?

1 Like

Correct, I only need the first letter of the series

This is easy… use this.

blueprint first letter.json (7.4 KB)



Hi. Why do not try use GET function:

​getTyler James-Matthew Smith;0)​

The result will be the first letter of the string

Thanks, Helio!
If you have questions reach out :wink:

1 Like

Who knew it would be so easy haha, thanks!