Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[solved] findrx - from|rf flags
#1
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)?

Thanks.
#2
It means you can use either from or rf.

To combine flags, operator |.
#3
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?
#4
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.
#5
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.
#6
Macro Macro2201
Code:
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"

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


Forum Jump:


Users browsing this thread: 1 Guest(s)