Get first word:
/\w+/
Example:
const matcher = str.match(/\w+/); console.log("The first string is: ", matcher?.[0]);