Replacing a word after a matched pattern

Hello,

Actually i want to replace the word after a matched pattern.

For Ex:
lets say that i am reading a file line by line

while read line
do
echo $line
# i need to search whether a pattern exists in the file and replace the word after if the pattern exist.
# for example : $line=" this is a test line"
# $Pattern="is a"
echo "Enter a new value to replace the '"$Var1"' : "
read NwPat <&1
# i want to retrive $Var1="test" and replace it with a another pattern
# $NwPat which is provided as user input.
done < $INT_FILE

Any help would be useful.

Thanks

Rahul

got the solution guys its TXT=`echo $line | sed -e 's/.* //'`

Thanks

rahul