Submit Your Article Forum Rules

Results 1 to 6 of 6

Thread: Converting to VB Script

  1. #1
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    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.

  2. #2
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    Re: Converting to VB Script

    Anyone know how to use the preg_match/all function?
    I think this might help with my problem.

  3. #3
    Senior Member
    Join Date
    Nov 2005
    Posts
    132

    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]"

  4. #4
    Junior Member
    Join Date
    Jun 2008
    Posts
    12

    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.

  5. #5
    Junior Member
    Join Date
    Dec 2008
    Posts
    2

    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!!!!

  6. #6
    Junior Member
    Join Date
    Apr 2009
    Posts
    25

    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

Similar Threads

  1. Website Not Converting
    By CET in forum Google AdWords Discussion Forum
    Replies: 84
    Last Post: 02-04-2010, 12:53 PM
  2. converting 1 a day
    By teamonfuego in forum Google AdWords Discussion Forum
    Replies: 2
    Last Post: 02-04-2010, 11:22 AM
  3. Converting .dfx to .dwg - Any ideas
    By carju1 in forum The Castle Breakroom (General: Any Topic)
    Replies: 2
    Last Post: 04-04-2006, 08:27 PM
  4. Converting to CSS
    By H4KSY in forum Web Programming Discussion Forum
    Replies: 14
    Last Post: 03-05-2004, 11:24 AM
  5. PSP converting to .ai format
    By matauri in forum Graphics & Design Discussion Forum
    Replies: 26
    Last Post: 12-13-2003, 12:19 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •