How would I get the accroyn letter of the string
for example i have a string
“Location1 Location2 Wall21” or may have “loc loc wal2012”;
I need Output looks like
loc1loc2wal21 and loclocwal2012
means to say first 3 letter of a word and all numeric words with that string
I used this
echo preg_replace('~\b(\w{3})|.~', '$1', $s);
But it gives only 3 words not all numeric charcter.
AnyBody have idea how to resolve this
Thanks
Then only include letters, and take out that
|.:Here’s a demo.