$sentences = $dbh->selectall_arrayref("SELECT ID, sentence FROM texts WHERE sentence REGEXP '(?i:$query)'");