[PHP] Remove Dynamic String between StringA and StringB

2004-01-27 Thread Jack Bauer
Hi :), i tried your code zu replace some parts of a string, the problem is that this method only replaces when there is only 1 word between stringA and stringB. i got the problem that the part between both strings is a dynamic one and much larger then 1 word. i really tried to use the php manual

Re: [PHP] Remove Dynamic String between StringA and StringB

2004-01-27 Thread Martin Luethi
$pattern = /$stringA.*?$stringB/; .*? - matches everything between $stringA and $stringB the ? means: stop matching after the first occurence of $stringB (quantifier minimizer). otherwise .* would match everything between the first occurence of $stringA and the last

Re: [PHP] Remove Dynamic String between StringA and StringB

2004-01-27 Thread memoimyself
On 27 Jan 2004 at 13:25, Jack Bauer wrote: i tried your code zu replace some parts of a string, the problem is that this method only replaces when there is only 1 word between stringA and stringB. Of course. \w* will match alphanumeric characters, but not whitespace, and word boundaries are

[PHP] Remove Dynamic String between StringA and StringB

2004-01-26 Thread Jack Bauer
Hi :), i'm looking for a function to remove multiple dynamic parts of a string, there are only the start and end strings given (remove all between string A and string B) got somebody a working procedure for that? regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

Re: [PHP] Remove Dynamic String between StringA and StringB

2004-01-26 Thread memoimyself
Hello 24 fan, On 27 Jan 2004 at 0:56, Jack Bauer wrote: i'm looking for a function to remove multiple dynamic parts of a string, there are only the start and end strings given (remove all between string A and string B) got somebody a working procedure for that? I'm not sure I understand

Re: [PHP] Remove Dynamic String between StringA and StringB

2004-01-26 Thread Matt Matijevich
snip Hi :), i'm looking for a function to remove multiple dynamic parts of a string, there are only the start and end strings given (remove all between string A and string B) got somebody a working procedure for that? regards /snip a start of a procedure I have $stringA = string A; $stringB