3 ms·
Nice. I am intrigued by the leading underscore, are you just using that as a throwaway variable? You could get the username and domain on their own with: u
by lzell 17y ago
Nice. I am intrigued by the leading underscore, are you just using that as a throwaway variable? You could get the username and domain on their own with:
username, domain = [*/([^@]+)@(.+$)/.match("foo@example.com")][1..-1]
And it is super readable.
- twoism 17y agothis works as well... username,domain = */([^@]+)@(.+$)/.match("foo@example.com").captures