When you extract metadata files from HFM in APP format the files have a lot of padding to align columns. I often want to remove this padding but sometimes I cannot remember the regular expressions and spend a few minutes fiddling about until I get them right. For my own and other peoples benefit I thought I would write them down. To find out more about regular expressions see Wikipedia.

Solution

To remove padding using Notepad++:

  1. Start Notepad++
  2. Open the APP file you want to remove padding from
  3. Press Ctrl+F
  4. Select the Replace tab
  5. Select Regular expression from the Search Mode group
  6. Enter \s+; in the Find what box
  7. Enter ; in the Replace with text box
  8. Click the Replace All button. This removes any padding between fields
  9. Enter \s+\r in the Find what box
  10. Enter \r in the Replace with text box. This removes any trailing padding
  11. Click the Replace All button. This remove any trailing padding

If you use another text editor like PSPad or TextPad which has regular expressions. You should be able to use the above regular expression.

How to removing padding from Oracle Financial Management (HFM) APP Files