Deleting following spaces in current line
Posted: Fri Jan 25, 2008 8:02 am
I have to replace BLANKS in an XML-content. The XML-File looks like this:
...
<element id="zlnr">T0379885</element>
</datarow>
<dataset id="tbl_ZM_tabelle">
<datarow>
<element id="knre1">AT</element>
<element id="knre2">U 14291808</element>
<element id="dreieck">false</element>
<element id="betrag">986</element>
</datarow>
<datarow>
<element id="knre1">GB</element>
<element id="knre2"> 615 5511 59</element>
<element id="dreieck">false</element>
<element id="betrag">254</element>
</datarow>
<datarow>
<element id="knre1">NL</element>
<element id="knre2">812 915422 B01</element>
...
In all lines with the element "knre2" the BLANKS in the following content should be deleted. I tried to use the following macro:
Start Recording:
- Key: F5 -> Find "knre2"
- Key: Strg G -> Goto Column39 (with extend selection)
- Key: F8 -> Replace [:BLANK:] with nothing (Scope: Selected text)
- Key: ESC
- Key: Arrow down
- Key: Pos1
Stop Recording
During recording this works fine, but when playing back the cursor moves correct, but no changes are made.
Perhaps it would be better to use regular expressions, but how ?
...
<element id="zlnr">T0379885</element>
</datarow>
<dataset id="tbl_ZM_tabelle">
<datarow>
<element id="knre1">AT</element>
<element id="knre2">U 14291808</element>
<element id="dreieck">false</element>
<element id="betrag">986</element>
</datarow>
<datarow>
<element id="knre1">GB</element>
<element id="knre2"> 615 5511 59</element>
<element id="dreieck">false</element>
<element id="betrag">254</element>
</datarow>
<datarow>
<element id="knre1">NL</element>
<element id="knre2">812 915422 B01</element>
...
In all lines with the element "knre2" the BLANKS in the following content should be deleted. I tried to use the following macro:
Start Recording:
- Key: F5 -> Find "knre2"
- Key: Strg G -> Goto Column39 (with extend selection)
- Key: F8 -> Replace [:BLANK:] with nothing (Scope: Selected text)
- Key: ESC
- Key: Arrow down
- Key: Pos1
Stop Recording
During recording this works fine, but when playing back the cursor moves correct, but no changes are made.
Perhaps it would be better to use regular expressions, but how ?