Only select words with all lower case characters javascript

I am trying to write a regex to match only words that contain only un-capitalized letters in a string, but cannot figure it out.


var str = "What a wonderful Sunday Afternoon";

I have managed to match any words beginning with a capital letter using this regex var str1 = str.match(/[A-Z][a-z]+/g)

Here str1 returns [What, Sunday, Afternoon]

What I now want to do is write a regex that returns a and wonderful.


You don’t need regular expressions for this.

Just split the string at whitespace, and then filter the array based on whether the word is lowercase.

Example Here

var string = "What a wonderful Sunday Afternoon";
var lowerCaseWords = string.split(' ').filter(function(word) {
  return word === word.toLowerCase();

// ["a", "wonderful"]