SqlAlchemy tips Regex search on Postgres # (all the codes are in flask-SqlAlchemy syntax) Book.query.filter(Book.name.op('~')('AUD$')).first()