Jump to content
  • Advertisement
Sign in to follow this  
H0bbes

Vbscript

This topic is 5468 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hei.... I need some help if you don´t mind, i'm programing with vbscript in asp page. i try to do a search in some files for a string insert by user, but when i try to find the string in the files i have some problems. Example dim txt,pos txt="This is a beautiful day!" pos=InStrRev(txt,"his") response.write(pos) Output:2 When i try to use the function instr() or InStrRev() they give me de position of substrings. i want that they give me only the position of the first string is equal to de string to search. for example : dim txt txt="This is a beautiful day!" if i search for "his" i want they return 0 I need to do a function or you know one that do? regards

Share this post


Link to post
Share on other sites
Advertisement
Use regular expressions. There's too much to them for me to explain here, but search msdn for "vbscript regexp" and you'll come up with what you need i'm sure.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!