making regex query works in SQLite databases