When you have a property that contains a full name you might want to easily grab either the first or last name. Here's how you do that with a little help from
replace and some regular expressions.First Name
replace(prop("Full Name"), " .*", "")
replace(Starts the function.
prop("Full Name"),Specifies the text you wish to manipulate. In this case it's the Full Name property.
" .*",A regular expression for selecting all of the characters after and including the first space.
""What to replace the selected characters above with. In this case it's nothing.
)Ends the function.
Last Name
replace(prop("Full Name"), ".+ ", "")
replace(Starts the function.
prop("Full Name"),Specifies the text you wish to manipulate. In this case it's the Full Name property.
".+ ", or "[^ ]+",".+ ", → A regular expression for selecting all of the characters up to and including the last space. Replacing that with nothing will leave the very last name."[^ ]+", → A regular expression for selecting the first word. Replacing that with nothing will return every word after the first space.""What to replace the selected characters above with. In this case it's nothing.
)End the function.
Example
First/Last Name
