Manipulating text.....?

If I receive (via API) a text field (a name) that says “Bob Johnson” and I want to only grab the FIRST name, how would I do that in Bubble??

I’m trying to implement some sort of logic that says “Pull everything preceding the first space” or something like that… Just not figuring it out.

EXAMPLE: (input) “Bob Johnson” (output) “Bob”

AH! Just figured it out… Asked too soon. Extract with Regex does this!

(?:^|(?:[.!?]\s))(\w+)

This topic was automatically closed after 70 days. New replies are no longer allowed.