3 ms·
> /^(?:\/(?:\\\/|[^\/\n])+\/[gimuy]{0,5}|\\[^\n]|[^\n\\\/])+$/ What would you say was the query for this?
by mike_hock 4y ago
> /^(?:\/(?:\\\/|[^\/\n])+\/[gimuy]{0,5}|\\[^\n]|[^\n\\\/])+$/
What would you say was the query for this?
- thamer 4y agoThe regular version of ChatGPT can explain it pretty well. I asked it about your regex and it gave me a detailed breakdown; it's a bit too long to post it here but just to quote the [gimuy] part: > [gimuy]{0,5}: This part of the pattern matches optional regex flags that can follow the closing forward slash of the regex pattern. The allowed flags are g (global), i (case-insensitive), m (multiline), u (unicode), and y (sticky). This part of the pattern matches zero to five of these flags, without repetition. Full response: https://gist.github.com/nicolasff/3bbfb4cb8a514f58e140b887bf9c4d08 https://gist.github.com/nicolasff/3bbfb4cb8a514f58e140b887bf...