Hello bkone,
It might be something like that, though I did not test it:
// Define a filename
parameter "filename" = "{pathname of file ("/tmp/myfile.ini") whose (exists lines whose (it contains "allow_host") of it )}"
// Define old and new text
parameter "textToReplace" = "allow_host = A B C D"
parameter "newText" = "allow_host = A B C D E F G H"
// iterate through the file replacing lines as necessary
appendfile {concatenation "%0a" of ( if (it contains (parameter "textToReplace")) then ((preceding text of first (parameter "textToReplace") of it) & (parameter "newText") & (following text of first (parameter "textToReplace") of it) ) else it ) of lines of file (parameter "filename")}
// backup the old file
move "{parameter "filename"}" "{parameter "filename"}.bak"
// replace with the new file
move __appendfile "{parameter "filename"}"