The duplicate function in a separate class and another these 3 lines may be the same there is really no need to make this tiny bit of code reusable between the two.
As for the question mark this is due to a quirk of the sql output the are tearing apart in this class. Only the SQLite implementation requires this additional question mark to be preset in the regex.