Jump to content

Help with RegEx replace


roydukkey

Recommended Posts

Here is the what i need to happen. Much thanks to anyone willing to help.

 

I need to replace 'f=varying-string' from 'f=varying-string&killer=lop&you=pop'.

 

The string need to be replaced no matter where it is. ie. 'killer=lop&f=varying-string&you=pop'

 

I'm trying this:

 

preg_replace( "/^[f=].*(^&.*$)$/is", "", $_SERVER['QUERY_STRING'] );

Link to comment
https://forums.phpfreaks.com/topic/166893-help-with-regex-replace/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.