Jump to content

preg_replace postCode="*"


rockinghorse

Recommended Posts

Have been tearing my hair out about this one (and I don't have a lot of hair!):

 

how do I preg_replace postCode="xxx" with postCode="yyy"?

 

I have tried

preg_replace('postCode=".*"','postCode="yyy"',$input)

and many variations but I just can't seem to get it to work. Any help appreciated.

NB, that postCode is within other text, so:

blah="moo" foo="bar" postCode="yyy" ...

Link to comment
https://forums.phpfreaks.com/topic/248182-preg_replace-postcode/
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.