Hi all,
😕
I am so confused by preg_replace
I have very long string, and it happens to have a domain in it, and the domain has hyphens in it, and extends to a few directories.
Example:
text of string...http://www.my-domain-here.com/dir1/dir2/file.txt...remaining text
And I want to change this to
text of string...http://www.newdomain.com/file.txt...remaining text
The file.txt changes for every file. The only static text is the domain and the directories.
How do I do a preg_replace to change the domain and dirs to a normal domain.
Many Thanks.