Normalizing Profile Information with Regular Expression in Hyperfish

Justin Tung -

Normalizing employee information across an organization is one of the many benefits of adopting Hyperfish. It is not uncommon for third-party applications to rely on Active Directory for employee information in a specific format.

Using Hyperfish, Regular Expression patterns can be applied to attributes by setting up a custom format from Hyperfish Settings -> Attributes.

Step 1

Select the 'Formats' tab, then click '+ Add Format' from the top or bottom of the list:

Step 2

Add a label and description for the new format, and select 'Text Input' as the render type. A 'Pattern' field will emerge, allowing for the input of a regular expression pattern:

 

Here are some patterns to get started with: 

  Example Regular Expression Pattern
North American Number Pattern - Hyphen Separated, with area code  123-456-7890 ^[2-9]\d{2}-\d{3}-\d{4}$
North American Number Pattern - with area code, accepts dashes, dots, and spaces as separators (123) 456-7890, 123-4567, 123.456.7890 ^\(\d{3}\)\s?|\d{3}(\.|-|\s)?)\d{3}(\.|-|\s)?\d{4}$
UK Phone Number - with international option  +44 (0)1234 567890, 01234-567890 ^\s*\(?((\+0?44)?\)?[ \-]?(\(0\))|0)((20[7,8]{1}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{4})|([1-8]{1}[0-9]{3}\)?[ \-]?[1-9]{1}[0-9]{2}[ \-]?[0-9]{3}))\s*$
UK Mobile Phone Number +44 7123 456 789, 07123 456789 ^(\+44\s?7\d{3}|\(?07\d{3}\)?)\s?\d{3}\s?\d{3}$
PA,OH,MI, License Plates (e.g. for employee parking)  ABC 1234, DEF 5678 ^[A-Z]{3}(\s)?[0-9]{4}$

More examples and other RegEx tools can be found at RegExLib.com

Step 3

After applying your new format, the corresponding attribute field in the Hyperfish Profile Update page will validate using the specified RegEx pattern:

 

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.