Re: Problem with RegEx for BBCode
| From: | Daniel P. Brown | Date: | Sat, 27 Nov 2010 19:05:08 +0000 |
| Subject: | Re: Problem with RegEx for BBCode | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-309724@lists.php.net to get a copy of this message | ||
Please be sure to hit Reply-All so that the list is CC'd on each
response as well.
On Sat, Nov 27, 2010 at 13:55, Asmann, Roland <Roland.Asmann@adesso.at> wrote:
>
> I'm currently running this on a default XAMPP installation on my PC,
> because I was told something similar is running on the server. I thought
> this had a default RegEx lib, or does it have something extra for that?
No, I mistyped, it's not your fault. I meant: which function are
you using to execute the regexp?
> As for the code, here's the part that I think *should* work, but doesn't
> do the trick for me:
>
> $s = preg_replace("/\[i\]((\s|.)+?)\[\/i\]/", "<i>\\1</i>",
> $s);
This is exactly what I meant when I erroneously said, "library."
--
</Daniel P. Brown>
Dedicated Servers, Cloud and Cloud Hybrid Solutions, VPS, Hosting
(866-) 725-4321
http://www.parasane.net/