ok, this is going to be a real easy answer for somebody. I just know it.
First the basics: created a script that 1.)ran an SQL query and output to an HTML file. Then 2) ran it though another script that made it suitable to post on a forum like this one and lastly 3) print it out so it can be copied and pasted. Very simple stuff:
Code:
(sql query -> forum.post)
sed -i.bak s/\</\[/g forum.post
sed -i.bak s/\>/\]/g forum.post
sed -i.bak "s/TABLE[ ]BORDER=1/Table=\"class: grid, width: 100\%, align: center\"/g" forum.post
cat forum.post
Something makes me think I got some help from here on it, forgot a \ or something...
Anyway, moving on...
The script works flawlessly. It turns an HTML table into BBCode table. However, there is an issue. The database contains some web addresses (
http://test.site.com/folder/page) and I would like to make them clickable in my bbcode table. I know there is a way to do this. I can find "HTTP://" because all addresses start with that, but they are all variable lengths.
Not to mention, the bbcode for url's goes something like this:
Code:
[ URL="http://test.site.com/folder/page" ]text here[ /URL]
(had to put spaces in to make it show up, even in code tags)
So not only do I have to wrap the address within the tags, I will also need to insert a text block between them.
Any suggestions?