Results 1 to 7 of 7

Thread: (fairly) advanced string handling loop

  1. #1

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    (fairly) advanced string handling loop

    I need to create a loop in VBscript for an ASP app that will take a user input and loop through takeing each word and acting on it.

    BUT when the two words are joined by SQL logic words like AND, OR NOT etc in capitial take the word before it and the word after it and act on it.

    ALSO if the user types quotes then these must be the content of these must be taken as one "word" and acted on.

    Given the power of the server and the number of users I need to be as quick as possible so the code must also be efficient while still being easily read.

    My problem is I suck at string manipulation in a large way.

    Your help will be greatly apriciated.
    ?
    'What's this bit for anyway?
    For Jono

  2. #2

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774
    Am I barking up the wrong tree here?
    ?
    'What's this bit for anyway?
    For Jono

  3. #3
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    Originally posted by Matt_T_hat
    Am I barking up the wrong tree here?
    For efficient string manupulation look into the RegEx(Regular Expression).
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  4. #4
    Frenzied Member Spajeoly's Avatar
    Join Date
    Mar 2003
    Location
    Utah
    Posts
    1,068
    You need to write a funtion that checks for every word you want to act on, using the logic that you stated, then loop through the text calling the function for every word in a string.

  5. #5
    New Member
    Join Date
    Apr 2004
    Posts
    3
    well.... I always like to use the SPLIT and JOIN functions... basically you would start at the top level of your logic (like SQL statements) and start chopping. Then you could process each word through loops. The problem will be to note all keywords and then lay out a logic of what gets treated when...

    I see it as quite possible, just with some planning.

  6. #6

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774
    Ok thankyou.

    I will take some time (stop being ill) and get back to you after I have properly considered what has been said. At least I know it can be done.

    Now to start with the how... hmmmmmm....
    ?
    'What's this bit for anyway?
    For Jono

  7. #7
    PowerPoster Dave Sell's Avatar
    Join Date
    Mar 2004
    Location
    /dev/null
    Posts
    2,961

    Re: (fairly) advanced string handling loop

    Never mind!~

Posting Permissions

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



Click Here to Expand Forum to Full Width