Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Question about searching in txt-file
#2
Macro Macro1474
Code:
Copy      Help
str f="$temp$\big.txt"
str String="quickmacros"

;----------------------------

;This code creates file for testing. Delete this code if you already have the file.

_s=
;qqqq wwwww
;eee quickmacros ffffffff
;gggg hhhhhhhh
if !dir(f)
,_s.setfile(f)

;----------------------------

str s.getfile(f) line
if(findrx(s F"^.*\Q{String}\E[^\r\n]*$" 0 8 line)<0) out F"''{String}'' not found."; ret
out line


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)