Regex for string before a space and number [closed]

  javascript, regex

I have some strings like this ‘aaa1bbbb 2ccc’. I would just like to return ‘aaa1bbbb’ but can only seem to get the substrings either before the space or the first number.

Thanks!

Source: Ask Javascript Questions

LEAVE A COMMENT