Problems / Split Full Name / Editorial
regexp_extract(full_name, '^(\\S+)', 1)
^\\S+
regexp_extract(full_name, '(\\S+)$', 1)
customer_id
Splitting on spaces and indexing (parts[0], parts[-1]) works, but requires knowing the list length in SQL. Anchored regular expressions (^\\S+, \\S+$) express "first word" and "last word" directly and handle two-, three-, and four-word names with the same expression.
parts[0]
parts[-1]
\\S+$
Solve Split Full Name yourself →