In my bash script, i am trying to execute following Linux command:

sed -i "/$data_line/ d" $data_dir

$data_line is entered by user and it may contain special characters that could brake regex. How can i escape all of the possible special characters in $data_line before i execute sed command?

Edit
Report