Editing an .ini file using regex or some form of pattern matching

I have a file texstudio.ini, inside that file there is the following line

ToolsCommandspdflatex="/usr/texbin/pdflatex" -synctex=1 -interaction=nonstopmode %.tex

I would like to change the above to

ToolsCommandspdflatex="/bin/texliveonfly" %.tex

without having to have to go inside the file and do it manually. In other words how could I do this using a bash script?

The file also contains several other command, for example

ToolsCommandslatexmk=
ToolsCommandslualatex="lualatex -synctex=1 -interaction=nonstopmode %.tex"
ToolsCommandsmakeglossaries=
ToolsCommandsmakeindex=makeindex %.idx
ToolsCommandsmetapost="mpost -interaction=nonstopmode ?me)"
ToolsCommandspdf-chain=txs:///pdflatex | txs:///view-pdf
ToolsCommandspdflatex="/bin/texliveonfly" %.tex
ToolsCommandspre-compile=
ToolsCommandsps-chain=txs:///latex | txs:///dvips | txs:///view-ps
ToolsCommandsps2pdf=ps2pdf %.ps
ToolsCommandsquick=txs:///compile | txs:///view
ToolsCommandsrecompile-bibliography=txs:///compile | txs:///bibliography | txs:///compile