fredostrich
New Member
I have a string that will have pipes | in it. for example: \[code\]$string = 'hello | hello <htmltags> etc|Any character';\[/code\]NO what i want to do is remove last pipe followed by ANy character.so that my result would be following after preg_replace.\[code\]$replaced_string = 'hello | hello <htmltags> etc';\[/code\]can you help me, what regular expression pattern i should use.