abasit83 abasit83 - 1 year ago 62
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 ...


Answer Source

Use preg_replace


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

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download