I'm using redis to cache my data and in order to create a key for the key value pair that gets stored in redis, I'm using the mongoose query stringified because of it's uniqueness, but I have queries that use Date.now()
so the key keeps changing making it impossible to reference again later. Therefore I need a regex expression that removes all unix timestamps after "gte"
or "lte"
the gte and lte part can stay, just the timestamp that changes needs to go. Can anyone show me a regex expression to accomplish this? I appreciate any help!
Sample query
{"$and":[{"auctionType":{"$eq":"publicAuction"}},{"auctionEndDateTime":{"$gte":1583173635163}},{"blacklistGroup":{"$ne":"5e5a99fcd4a8685088b7937c"}},{"startTime":{"$lte":1583173635163}}],"collection":"listings"}