04-11-2008, 01:22 AM
|
#26 (permalink)
|
|
The Addict
Join Date: Nov 2007
Posts: 282
Thanks: 61
|
Code:
$pattern[0] = "/\[b\](.*?)\[\/b\]/i";
Ain't good enough :)
What If I wanted to hmm check the bold tag like this:
That little regex wouldn't check it it'll display it like it is.
Thats why you use the "s" modifier :) to make the "." match new lines also :)
Code:
$pattern[0] = "/\[b\](.*?)\[\/b\]/is";
Now
Turns into
Code:
<strong>
test
</strong>
I taught my self something :)
(remove the spaces in the [ b] tags -.-.. stupid code tag is broke lol..)
__________________
PHP/XHTML Freelancer:
Cleanscript.com v3 - Programming starting at just $5 act now!
|
|
|
|