79548315

Date: 2025-04-01 10:17:57
Score: 1
Natty:
Report link

I attempted to use substring() with regex but haven't found the best approach.

Here’s an SQL query that partially works:

SELECT substring(email_from FROM '<[^@]+@([^>]+)>') AS domain
FROM my_table;

For the input Lucky kurniawan <[email protected]>, it correctly returns:

hotmail.com
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (0.5):
Posted by: lucky kurniawan