You searched for the word(s):
< 1 second(s)
The second one does work, but if there are no // before the pattern, then it erases everything before the pattern. I haven't been able to figure out how to fix this..
Thank you for your help, I have been using: (?!(?:(?!<).)*>) and it works perfectly. And my other question about the double forward slashes, I have written this: (?=.*//) which will match anything up until double slashes on a line. But the problem is that if there are no // on the line, then it will fail to match the patterns before the ...
Thanks! =(?!(?:(?!<).)*>) worked perfectly, but do you think you could explain what the different parts mean?
And is there a way to make this work so that it has the same result, but only when the pattern is after '//' on the same line?
I am trying to only replace a string if it does not lie between < and >, I have tried this code:
But it does not ever replace the equals sign.. Can anyone help me fix this?
Thank you Susan, I will look for some good tutorials!
Thank you for your help, I am just wondering one more thing, I'm not sure what each of these parts do with the question marks and colons:
Thanks for explaining that. :)
I was just wondering how I could allow a quote block inside of code tags? such as [*code]something[*b]bold[*/b]something[*quote]this is a quote block[*/quote]something[*/code] So it would display the bold tags, but replace the quote tags.
And if I wanted to change what is replaced within different code tags ...
Thank you so much, this works perfectly. But I just have one question about some of the other changes you made to my code:
I was just wondering what (8||30), ((?:(?!\]).)*), ...
Your code does exactly what I want, but do you think you could explain it a little?
Here is my complete code for my bbcode's:
$tagCodes = ...
I am working on making a bbcode system with php using preg_replace(), and I am making it so that other tags will not work inside of a code block. This is the code I am currently using, it almost works:
what I want it to do is if [*code] and [*/code] are around the text inside, ...