on 06-16-2016 12:35 PM
Hello, community,
I am creating rules for profiling data in Information Steward using regular expressions. It seems to be quite time consuming. Can you please share the regexes you use?
Erlan,
The thing with regex is that rules are likely to be unique (ie name starts with XXX or YYY or contains or ends in) which make it hard to know what you're after. However, as it's a standard you can search online for techniques on how best to apply to your needs.
Some examples that may suit you are:
Emails (RFC5322): match_regex(rtrim(lower($email_address), ' '), '[a-z0-9!#$%&*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?', NULL)
Landline Phone: match_regex(rtrim($landline_number, ' '), '[0-9]{2}\s[0-9]{4}\s[0-9]{4}', NULL) OR match_regex(rtrim($landline_number, ' '), '[0-9]{2}\s[0-9]{8}', NULL)
Mobile/ Cell Phone: match_regex(rtrim($mobile_number, ' '), '04[0-9]{2}\s[0-9]{3}\s[0-9]{3}', NULL) OR match_regex(rtrim($mobile_number, ' '), '04[0-9]{2}\s[0-9]{6}', NULL)
regards
Adrian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What product is this for?
Regards,
Kevin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
25 | |
12 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.