I am trying to grab the capital letters of a couple of words and wrap them in span tags. I am using preg_replace for extract and wrapping purposes, but it\'s not outputting
You need to put the pattern in parentheses /([A-Z])/, like this:
/([A-Z])/
preg_replace("/([A-Z])/", "$1", $str)