Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
findrx, back referencing, and variable assignment
#2
But there are no bakreferences. Do you mean subpaterns? Anyway, a backreference match is exactly the same as the subpatern that it references.

Code:
Copy      Help
str c; ARRAY(str) a
c="computers.com"
findrx(c "(c.*s)\.(\D{2,3})" 0 0 a) ;;no backreferences
;findrx(c "(c\D{2}).*?\.(\1)" 0 0 a) ;;backreference \1

out a[0]
out a[1]
out a[2] ;;if it is backreference, it is equal to a[1]

If there are > 1 subpaterns, you need ARRAY. If 1, str.


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)