Get the First Letter in a Word

Hi Everyone,

I need to get the first letter in a word in my Airtable Table. I used Regex ( copied from Airtable Community Topic ) with a formula column but I’m getting the first two letters. But I need only the first letter.

Here’s the Regex that I copied from Airtable Forum:

REGEX_REPLACE(Name, "\\B\\w+\\W*", "")

Not sure how to do it. I’m new with Regex :slightly_smiling_face:

Appreciate any help!

Thank you

Are you doing this in Airtable, or in Glide?

Thanks Darren for that fast reply!

In Airtable.

Thanks again for the reply!

oh, in that case I can’t help you - sorry

No problem Darren! Thanks for your reply!

I like to ask if I do this in Glide with the Extract Matching Column what would be the Regex Code?

I know there is a Plugin that already created for this user case but I like to use every features in Glide :upside_down_face:

It depends on your definition of a letter. Most likely what you want is ^(\w)

1 Like

Yeah! After some research finally I found how to do this on Airtable! :partying_face:

This is the Regex Code :

REGEX_EXTRACT(Name, "\\b[a-zA-Z]")

image

And the result :

image

And also thanks Darren because your code also works on Glide Too!

Code :

^(\w)

image

Result :

image

Thanks again Darren for your fast reply and help! Really Appreciated!

Glide Rock :sunglasses:

Thank you

2 Likes

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.