I'm trying to target the first letter of each word in a string. I'm working in JavaScript. I've found discussions for Python and PHP that don't address my problem specific to JavaScript.
str = "i'm a little tea pot"
regEx = /^.|\b[a-z]/g
I have a function that uppercases each letter the regEx finds. My result is the m
after the apostrophe is capitalized. How do I avoid this?
After uppercase function: I'M A Little Tea Pot"