Reputation: 28820
I want to filter out email addresses that start with a number of contain plus signs, for example:
[email protected]
or
reply+p-15549020-4d983e7b9e3d4ec45c5ae66473f90b765011a17c-4205@reply.github.com
I am using postres and I know I can do this to filter starting with a number
select address from email_addresses where address !~ '^\d';
But how can Include symbols like +
and *
?
Upvotes: 0
Views: 61
Reputation: 91438
Have a try with this one:
select address from email_addresses where address !~ '^(\d|.*[*+])';
Upvotes: 1
Reputation: 785296
You can use:
select address from email_addresses where address !~ '^\d|[+*]';
[+*]
is a character class that matches literal *
or +
Upvotes: 2