I'm trying to get the first letter of every new word in the following string.
hello_world! hello___America! software-developer **for_life!?**
I've put together the following regex that almost gets there:
(\b\w|(?=)_[^_])
The problem is that it also copies the underscore preceding the next word.
I want the letter after the underscore (or chain of underscores), plus the first letter of all of the other words that I already have highlighted with that regex pattern.
The answer I'm looking for should be abstract enough to capture letters/numbers/words split between one or more underscores.
Here's the Rubular shortlink
