Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] findrx - from|rf flags
I'm trying to find some html text.

What does from|rf mean?

There are many choices for flags but how do I combine multiple options (eg case insensitive AND find all AND multiline)?

It means you can use either from or rf.

To combine flags, operator |.
I'm sorry, I don't understand what "from" and "rf" does

I tried reading the help file for both and I don't understand their uses.

Can you please explain them to me?
from can be used if you want to search not from the beginning. For example, when using findrx in loop and want to search from previously found offset.
rf can be used for same purpose, plus you can also specify to - where to stop searching.
The concept makes sense, but the syntax is puzzling.

Let's say I'm trying to search inside this text "ser Control Panel (0 new messages) • View your posts"

Does this mean I can use from with an index between 0 and 52 characters (the length of the string?)

How would I search the middle 48 characters using rf? - basically search from character 3 to character 50), or the string, "r Control Panel (0 new messages) • View your pos"

Thanks for your patience.
Macro Macro2201
Copy      Help
str s="zz FIND uu FIND"

out findrx(s "FIND") ;;search in whole string
out findrx(s "FIND" 5) ;;search in "ND uu FIND"

x.ifrom=5; x.ito=s.len-2 ;;search in "ND uu FI"
out findrx(s "FIND" x) ;;not found
Got it Smile That makes sense now.

Forum Jump:

Users browsing this thread: 1 Guest(s)