The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#2
|
||||
|
||||
![]()
The dots in your censor word b.s. are being interpreted as the "any single character" expression, which is a dot (.) in the regular expression. What you need to do is escape any characters that have a special meaning for regexes, in your $censorword, before calling preg_replace In PHP, you can use preg_quote to do this.
Code:
$text = preg_replace('#(?<=[^a-z]|^)(' . preg_quote($censorword, '#') . ')(?=[^a-z]|$)#si', "[$censorword]", $text); |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|