1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How To Change Only First Delimiter Per Line.

Discussion in 'Black Hat SEO' started by BlingBling, Mar 4, 2010.

  1. BlingBling

    BlingBling Newbie

    Joined:
    Oct 3, 2009
    Messages:
    22
    Likes Received:
    19
    Hi all I am working on a bot to be released here but I need help with something that someone probably knows!! Lots of smart people on here...

    So I have a large list and its format is like this Title;Body contenst
    on each line

    My problem is often the body content will contain another semi colon which messes up the desired results.

    So what I really need to do is change the first delimiter on each line (;) but not any after that.

    This may seem like something dumb but its pretty much the last step before this bot is complete. I'm not looking for code to do this or anything, just a program that will work :) Thanks
     
  2. TapTapper

    TapTapper Junior Member

    Joined:
    Apr 15, 2009
    Messages:
    163
    Likes Received:
    138
    Occupation:
    coder, webstore mangler
    Location:
    US
    Home Page:
    As frankietp says, it depends on the language. Stuff like older ColdFusion has really neat builtin stuff to do this for you

    If I needed a brute force method here's what I'd do assuming the TITLE is of variable length

    Get the LEN of the full string
    Set a loop for x = 1 to LEN
    Make an empty textvar
    Do an INSTR on the full string, starting at 1, looking for the semicolon
    Loop through the string until you hit the semi
    As you loop through the string put each char into the textvar
    When you have your semi you will also have your title in the textvar
    Exit the loop and do whatever you want with the rest
    The rest will be LEN whole string - LEN textvar

    As I said, brute force and not pretty. But takes 5 mins to write and you're off to the races with whatever else you need to do. If your bit isn't huge it won't slow you down too much. I do it all the time for quickies
     
  3. nathanooo2

    nathanooo2 Registered Member

    Joined:
    Feb 3, 2010
    Messages:
    95
    Likes Received:
    1
    First you let us know on which language are you going on.Unless you put that on your post no one is going to help you.Though you have got an idea on vb that can resolve it if you did this with vb.
     
  4. BlingBling

    BlingBling Newbie

    Joined:
    Oct 3, 2009
    Messages:
    22
    Likes Received:
    19
    This was what I was looking for, I'm obv a vb noob.

    Great forums.