view raw
abasit83 abasit83 - 11 months ago 32
PHP Question

I have to remove static+dynamic text from string in php

I have to remove
from my news titles.

It appears anywhere in the title.
is static but the text after slash (
) is not static and it always have 10 alphabets.

Need Help ...



Use preg_replace


This regex:
- \b : boundary
- : literals
- \w{10} : any word with length of 10