...

View Full Version : regular expresions?



kwhubby
01-08-2004, 06:44 AM
HI, I am wondering how u do regular expresions (like in js) in php, anybody got any guides...

specifically I have two questions for regular expresions:

how wold i make some thing that auto parses urls, like this forum does, so searches for a url in a string then makes it a link in html?

and how would I make the image feature like this forum. with the vBcode tag thing, that gets converted it to html


I want to add these 2 features to my guestbook message board thingie, and I don't know regular expresions, so i don't know how id do it. I do know how to do the simple replace function, but thats it.

mordred
01-08-2004, 08:07 AM
Searching the PHP forum for "bbcode" shows quite useful results: :)
http://www.codingforums.com/search.php?s=&action=showresults&searchid=201767&sortby=lastpost&sortorder=descending

ReadMe.txt
01-08-2004, 08:04 PM
i found the page entitled "Pattern Syntax" (http://uk.php.net/manual/en/pcre.pattern.syntax.php) in the PHP manual taught me everything i needed to know, basically you use the functions on this page: http://uk2.php.net/manual/en/ref.pcre.php

kwhubby
01-08-2004, 08:31 PM
ah ha! thank you, exactly what I needed. I didn't think of searching for that, I did search for some other terms and didnt find any thing very useful.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum