Search & Replace

LiveAgent can automatically search for a string pattern in every incoming message and Replace it with something else before being displayed or stored in database. Can be used for obfuscating sensitive information like credit card numbers, social security info and such.

Search & Replace Setup

Step 1: Navigate to Configuration>System>Plugins

Step 2: Find Search & Replace plugin in the list and click Activate

Step 3: Click Configure and define each rule on a separate line in format [regular expression to search for]==>>[replacement string].

Please use free online regular expression tester like regex101.com or regexpal.com to test your expressions. Use regular expressions without delimiters and modifiers. You can use $1, $2 etc. in replacement string to reference captured groups.

Examples

To obfuscate 16 digit credit card number you can use:

  • ([0-9]{4})[0-9]{8}([0-9]{4})==>>$1xxxxxxxx$2

This will match a string like  4111111111111111 and change it to 4111xxxxxxxx1111

  • ([0-9]{4})[- ]?[0-9]{4}[- ]?[0-9]{4}[- ]?([0-9]{4})==>>$1xxxxxxxx$2

This will match any of the following string and change it to 4111xxxxxxxx1111

4111111111111111
4111-1111-1111-1111
4111 1111 1111 1111

To obfuscate social security number:

  • [0-9]{3}-[0-9]{2}-([0-9]{4})==>>###-##-$1

This will match a string like  123-45-6789 and change it to ###-##-6789

 

Ready to try LiveAgent?

It's free for the first 14 days! No credit card required.

Get Started
We work well with others...
Magento Joomla Wordpress Mailchimp
Contact us

support@ladesk.com

+1-800-811-6590 (Toll Free in USA & Canada)

+421 2 33 456 826 (European Union & Worldwide)

Quality Unit, LLC 616 Corporate Way, Suite 2-3278 Valley Cottage, NY 10989

Stay in touch
Blog Google+
© 2004-2015 QualityUnit.com, All rights reserved