Since regular expression is not supported by default SQLite, we can create a user function to do the job.
<?php
$db = new SQLite3("database.sqlit3", 0666);
// create a function named "preg_match"
// with the php core function "preg_match"
if ($db->createFunction("preg_match", "preg_match", 2) === FALSE)
exit("Failed creating function\n");
// this query will then works as expected
$result = $db->query("SELECT * FROM table1 WHERE
preg_match('/^(apple|orange)$/', variable1)");
?>