I’ve been doing some experiments with “replaceall” function to change content of a file. But Im wondering if it possible to replace a string with text taken from text box.
Example:
File:
NAME: JOHN DOE
GRADES:BLAH BLAH BLAH BLAH
NAME: JOHN DOE
GRADES2: BLAH BLAH BLAH
NAME: JOHN DOE
GRADES3:BLAH BLAH BLAH
Then I would like to type in a textbox another “NAME” to replaceALL “JOHN DOE’s” with for example: “HULK HOGAN”
EXPECTED RESULT:
File:
NAME: HULK HOGAN
GRADES:BLAH BLAH BLAH BLAH
NAME: HULK HOGAN
GRADES2: BLAH BLAH BLAH
NAME: HULK HOGAN
GRADES3:BLAH BLAH BLAH
Is this possible???
Thanks in advance.
Yes.
Eg (assuming you have a
TextViewwith idtextView)Same approach for
EditTexts