FRSH Posted March 29, 2011 Share Posted March 29, 2011 I'm working with the youtube API and the function $relatedVideo->watchURL returns a video url However when I use preg_replace("youtube","test",$relatedVideo->watchURL); it gives me the following error preg_replace() [<a href='function.preg-replace'>function.preg-replace</a>]: Delimiter must not be alphanumeric or backslash in <b>C:\wamp\www\site\test.php</b> on line <b>317 Help please? Quote Link to comment https://forums.phpfreaks.com/topic/232019-basic-preg_replace-help/ Share on other sites More sharing options...
bh Posted March 29, 2011 Share Posted March 29, 2011 Hi, you need a delimiter such as / preg_replace("/youtube/","test",$relatedVideo->watchURL); Quote Link to comment https://forums.phpfreaks.com/topic/232019-basic-preg_replace-help/#findComment-1193573 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.