Delete_Extra_Spaces - UNTCMS/MarcEdit-Tasks GitHub Wiki
Delete_Extra_Spaces Edits
Link to task file:
Scope
Deletes extra blank spaces when there should only be one.
Special knowledge
For this task, it is necessary to know how to create loops.
Steps
Delete extra spaces before dollar signs.
Replace all
#STARTLOOP:r=0
$
$
#ENDLOOP
Delete extra spaces at the end of fixed fields.
Replace all
#STARTLOOP:r=0
(^=.*)\s$
$1
#ENDLOOP
Search options: Use Regular Expressions
Delete extra spaces at the end of assorted fields.
Replace all
#STARTLOOP:r=0
(=[1234568].. .*\s)\s
$1
#ENDLOOP
Search options: Use Regular Expressions
Delete extra spaces at the end of 020 or 050 fields.
Replace all
#STARTLOOP:r=0
(=0[25]0 .*\s)\s
$1
#ENDLOOP
Search options: Use Regular Expressions
Delete extra spaces at the end of 7xx fields.
Replace all
#STARTLOOP:r=0
(=7[0134]. .*\s)\s
$1
#ENDLOOP
Search options: Use Regular Expressions
Delete extra spaces before commas.
Replace all
#STARTLOOP:r=0
,
,
#ENDLOOP