Avatar of arthurh88
arthurh88

asked on 

VB.NET find the next block of text inside a textbox beginning at position X

given a large amount of text inside  a textbox (it is HTML code), I need to be able to do the following:

starting at character position X, find the next instance of a string.  WHen the string is found, return the new  position of the first character after the identified string.

I.E.  For lets say I have text:
The cat chased the mouse and the dog chased the cat.

Position = 5.  Find next instance of string "the"
Return the new position of the first character after the found string, and need code to exit if string is not found.

this would return "the" after the word "chased" and the new character position would be 18


Thanks for your help.
Visual Basic.NET.NET Programming

Avatar of undefined
Last Comment
arthurh88
ASKER CERTIFIED SOLUTION
Avatar of philipjonathan
philipjonathan
Flag of New Zealand image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of arthurh88
arthurh88

ASKER

how to I get string.indexOf?  is there an "Imports" statement I need?  I'm using VB.NET 2005
Avatar of arthurh88
arthurh88

ASKER

ahh nm I see, its not a "strings" command, but off my string itself i got it now, thanks.
.NET Programming
.NET Programming

The .NET Framework is not specific to any one programming language; rather, it includes a library of functions that allows developers to rapidly build applications. Several supported languages include C#, VB.NET, C++ or ASP.NET.

137K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo