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.
To remove padding using Notepad++:
- Start Notepad++
- Open the APP file you want to remove padding from
- Press Ctrl+F
- Select the Replace tab
- Select Regular expression from the Search Mode group
- Enter \s+; in the Find what box
- Enter ; in the Replace with text box
- Click the Replace All button. This removes any padding between fields
- Enter \s+\r in the Find what box
- Enter \r in the Replace with text box. This removes any trailing padding
- 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.