Informatica Developer: Remove White Spaces RegEx

Informatica Developer: Remove White Spaces RegEx

Posted by: Pooja Shet

An Informatica Developer mapping expression that uses REG_EXTRACT function to cleanse the data by removing unwanted whitespaces or empty-spaces.

Overview

Regular expressions provide the foundation for describing or matching data according to defined syntax rules. A regular expression is nothing more than a pattern of characters itself, matched against a certain parcel of text.Using Regular Expressions, it is simple to search for a specific word or string of characters. Almost every editor on every computer system can do this. Regular expressions are more powerful and flexible. You can search for words of a certain size. You can search Numbers, punctuation characters, patterns and so on.At the same time, Regular expression can be very confusing and tricky. The learning curve for Regular expression may not be very easy for everyone. Often this results in to underutilization of Regular Expression and true power is not harnessed.The download file available here exemplifies the power of Regular Expression. It uses REG_EXTRACT function to remove unwanted whitespace or empty space from the data. The input data poses following challenges.The white space may or not be present. Any amount of consecutive whitespace could be present in the data as shown in the example below.
Input Data Expected Output
Greg S      AndersGreg S Anders
Sarah             FeSarah Fe
       Sam CooperSam Cooper
Download file also contains a detailed PowerPoint presentation describing functionality and parameters of Regular Expression functions.

Features

  • Informatica Developer 9.5.1

Resources

Support