php - Replace all the first character of words in a string using preg_replace() -
i have string
this sample text. text used dummy "various" regex "operations" using php.
i want select , replace first alphabet of each word (in example : t,i,a,s,t,t,t,w,b,u,a,d,f,",r,",u,p). how do it?
i tried /\b.{1}\w+\b/
. read expression "select character has length of 1 followed word of length" didn't work.
Comments
Post a Comment