iEntry 10th Anniversary Forum Rules Search
WebProWorld
Register FAQ Calendar Mark Forums Read
Database Discussion Forum This is the place to find help resolving those nagging questions you have about implementing and using all kinds of databases. Need help writing a query? Need an opinion on Oracle? Post here!

Share Thread: & Tags

Share Thread:

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-16-2008, 05:49 PM
WebProWorld New Member
 
Join Date: Jun 2008
Posts: 12
KingOfHeart RepRank 0
Default Converting to VB Script

I want to convert some tags into VB style. I can easily convert "<b>" to "[b]" using str_replace.
What I need help with are the image and weblinks
I need to convert both ways
<a href = "whatever.com">testing</a> to testing
This is a little trickier because someone might create a broken tag, and if it creates a broken html link, that will produce errors.
Reply With Quote
  #2 (permalink)  
Old 06-17-2008, 10:42 PM
WebProWorld New Member
 
Join Date: Jun 2008
Posts: 12
KingOfHeart RepRank 0
Default Re: Converting to VB Script

Anyone know how to use the preg_match/all function?
I think this might help with my problem.
Reply With Quote
  #3 (permalink)  
Old 06-21-2008, 06:32 AM
WebProWorld Pro
 
Join Date: Nov 2005
Location: India, Kolkata
Posts: 111
Susmita RepRank 0
Default Re: Converting to VB Script

preg_match is a PHP function . Aren't you using VB Script?

In VB you may use a combination of InStr and Mid
Or you could replace "<a href" with "[a href" and "</a>" with "[/a]"
__________________
My Blog | Me at Twitter
Reply With Quote
  #4 (permalink)  
Old 06-21-2008, 08:55 PM
WebProWorld New Member
 
Join Date: Jun 2008
Posts: 12
KingOfHeart RepRank 0
Default Re: Converting to VB Script

No, I'm creating this in PHP.
I called it VB because in forums you type [b] and [u], etc.
I'm now thinking maybe it's a str_replace function combined with an explode.
Reply With Quote
  #5 (permalink)  
Old 12-06-2008, 09:52 AM
WebProWorld New Member
 
Join Date: Dec 2008
Posts: 2
xsaviorx1 RepRank 0
Default Re: Converting to VB Script

preg_match is a PHP function . Aren't you using VB Script?

In VB you may use a combination of InStr and Mid
Or you could replace "<a href" with "[a href" and "</a>" with "[/a]"
__________________________________________________ ________


thanks for the information!!!!
Reply With Quote
  #6 (permalink)  
Old 04-18-2009, 01:43 AM
WebProWorld Member
 
Join Date: Apr 2009
Location: Tokyo
Posts: 26
nayes84 RepRank 0
Default Re: Converting to VB Script

there is a perl script in the following link to do the work for you
HTML To BB Code Converter

you can use it like it is or you can just pick up the regular expressions and use with preg_match to make your own php code
Reply With Quote
Reply

  WebProWorld > Webmaster, IT and Security Discussion > Database Discussion Forum

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Converting Tags KingOfHeart Database Discussion Forum 0 06-16-2008 03:35 PM
Converting documents to .pdf Jeff Sundin Graphics & Design Discussion Forum 10 02-26-2008 07:47 AM
Can some help me converting a page in CSS? Webnauts Graphics & Design Discussion Forum 3 08-17-2004 05:58 PM
Converting to CSS H4KSY Web Programming Discussion Forum 14 03-05-2004 12:24 PM
PSP converting to .ai format matauri Graphics & Design Discussion Forum 26 12-13-2003 01:19 AM


All times are GMT -4. The time now is 04:06 PM.



Search Engine Optimization by vBSEO 3.3.0