Regex to search Socket ID #5170
-
I have integrated Socket.io and use it for client and server data communication.
The problem is I did not add an expiry here and now my Redis is flooded with socket IDs. Since my database has other info, I wnated to know if there is an regex pattern for socket.id which I can use to search and then delete. |
Beta Was this translation helpful? Give feedback.
Answered by
darrachequesne
Aug 23, 2024
Replies: 2 comments
-
Hi! You can use the following regex: |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
darrachequesne
-
Thanks a lot will try it.
…On Sat, 24 Aug, 2024, 03:00 Damien Arrachequesne, ***@***.***> wrote:
Hi!
You can use the following regex: [a-zA-Z0-9_-]{20} (or [\w-]{20})
—
Reply to this email directly, view it on GitHub
<#5170 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALLZ2VM234CJ2B54ENWYTPLZS6SYLAVCNFSM6AAAAABMM3XDXCVHI2DSMVQWIX3LMV43URDJONRXK43TNFXW4Q3PNVWWK3TUHMYTANBTGQ3TMMA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi!
You can use the following regex:
[a-zA-Z0-9_-]{20}
(or[\w-]{20}
)