Re: [SMARTY] Updated bbcode2html and html_doctype plugins
| From: | Andr� Rabold | Date: | Fri, 21 Mar 2003 11:58:06 +0000 |
| Subject: | Re: [SMARTY] Updated bbcode2html and html_doctype plugins | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-8803@lists.php.net to get a copy of this message | ||
Hi Rob,
> yes this is really working Code.. it means
> u = unordered list and
> o = ordered list
> it changes the tags used.
Ahh, now I understand. I don't really like this way of list handling but I
have implented it now ;-)
Just grab the newest version on the Wiki.
> preg_match("\{[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-
> [0-9a-f]{12}\}
> ","{30355844-0000-0010-8000-00AA00389B71}");
>
> Thanks if you can write one.. else don't worry about it..
>
This works:
preg_match('/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i'
,"{30355844-0000-0010-8000-00AA00389B71}");
Notice the "i" at the end of the string to use case insensitive matching.
1) The "{" and "}" brackets surrounding your search string makes no sense
there and are even wrong.
2) for preg_match you need a delimiting char both at the beginning and at
the end of your string. I used "/" here. After the last one you can add some
directives like the "i" above.
3) Use ' instead of " as string delimiter because then you don't need to
escape the backslashes in your search string anymore. These backslashes also
escape characters in your regex and in this case you would need to double
escape them. This is not only ugly but also hard to read. ;-)
bye,
André