How to edit specific variable in file?

HI guys i have a question.
Question 1: how do i modify a particular string?
e.g

echo "Please enter Book Title: "
    read a
    echo "Please enter Author: "
    read b
if [[ $(grep "^$a:$b" file.txt | wc -l) -gt 0 ]]
    then    echo " Record found!"

which will then pop out a menu with the follow output

1. Update Name
2. Update email
3.Update age
4. Update Marital staus

The question is, what codes do i haave to put in in order to change only the searched record shown?
e.g

Please enter Name: Simon
Please enter email: username@email.com
Record found!
Update name : Alex ( option 1)
Updated email: username6@gmail.com (option 2)

edited file.txt should have

Alex:username6@gmail.com:17:Married
Desmond:username4@email.com:18:Single
Harry:username12@email.com:21:Married
Alex:username1@email.com:78:Married

my file.txt has

Simon:username@email.com:17:Married
Desmond:username4@email.com:18:Single
Harry:username12@email.com:21:Married
Alex:username1@email.com:78:Married

am using bash script.

if you are asking how will you edit the particular string if the record is found. then you want to take the full line from file.txt then below thing will come in handy.

echo "Please enter Book Title: "
    read a
    echo "Please enter Author: "
    read b
if [[ $(grep "^$a:$b" file.txt | wc -l) -gt 0 ]]
    then    
echo " Record found!"
for line in file.txt  ###this is the file that contains all the 4 records
do
line >> out_file
done
fi