cancel
Showing results for 
Search instead for 
Did you mean: 

API accounts search | Query with REgex

NAIM
Discoverer
151

I hope this message finds you well.

I am currently working with an API to search for user accounts, specifically trying to filter emails that belong to certain domains using regular expressions (regex). However, I am encountering an issue where the query consistently returns blank results, and I am unable to pinpoint the cause.

Could you kindly assist me in troubleshooting this problem, or provide guidance on how to correctly implement the regex search for emails with specific domains?

Thank you in advance for your support.

Accepted Solutions (0)

Answers (1)

Answers (1)

KunalBansal
Active Contributor

Hello @NAIM,

If I understand correctly, you want to either delete or restrict DISPOSABLE EMAILS in the CDC system, right?

  • Remember that profile.email is an encrypted field in CDC schema and hence you won't be able to use the contains filter in the query tool or via rest API.
  • We have implemented this by writing a dataflow to fetch the count of profiles containing such-domains and later add a regEx validation in your screensets to restrict registrations with disposable-emails. (Note: you'll need to write your scripts to match the data for domains)
  • Example REGEX^(?!.*@(tempmail\.com|mailinator\.com|yopmail\.com)).@.\..+$

Here's the latest github repository of a global List of disposable email domains.

I hope this answers your query and close the thread.

Thanks and Regards,
Kunal Bansal
SAP CX Solution Architect