Jump to content

[SOLVED] some simple regex help


dsaba

Recommended Posts

normally i'm looking in a string for this ''. thats two single quotes followed by a period

and I replace it with this "" which is nothing

 

so thats

<?php
$string = str_replace("''.", "", $string);
?>

 

problem is, that I don't want to replace ''. when there is a \ before it all

for example I want to replace ''. but not \''.

 

so I know this can probably done with regex, how can I do it?

with preg_replace ??

 

 

-thanks

Link to comment
https://forums.phpfreaks.com/topic/50368-solved-some-simple-regex-help/
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.