Searching is complex

You already know how to find a substring, so you could run through the entire web page and check each two characters to see if they match >$, like this:

VVe Could search -through -the whole string for ">f", looking at Z characters at a W- ^

So -these ne*t ^ Characters must be the price, right?

You could do it this way... but should you?

There's a lot to worry about. Which two characters are you currently comparing? Where in the string are you right now? What if ">$" isn't found? Searching for substrings in strings is a little more complex than it first appears...

So -these ne*t ^ Characters must be the price, right?

But if you don't want to write code to search the string, what else could you do?

smart data

Was this article helpful?

0 0

Post a comment