Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
to replace the text in the file of a notepad
#10
Macro Macro2865
Code:
Copy      Help
str fileText=
;...
;1=
;9,800
;2=
;9,500
;...

str oldText=
;(?m)^1=
;([\d,]+)
;2=
;([\d,]+)$

str newText=
;Bom $1 bibom
;Mango $2 tango

int n=fileText.replacerx(oldText newText)
out F"Replaced {n} instances"
out fileText


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)