Answers for "how to display a string only to first space in javascript"

1

js get first space in string

str.match(/^(\S+)\s(.*)/).slice(1)
Posted by: Guest on April-16-2021

Code answers related to "how to display a string only to first space in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language