I have a file which, besides the 'normal' <cr> characters at the end of each record, also contains some unwanted <cr> embedded in some (not all) of the messages. The only way I can identify these is that they occur after a <BR>, i.e.,
where the ^M is how the <cr> appears in the vi editor.
Also, if the <cr> isn't immediately after the <BR> character, it's valid (so they tell me )
Since I'm nowhere near to being a regex expert, can someone get me started on filtering these out of the file? As it stands, the file causes serious indigestion when it is imported into the receiving application. The idea is to pass the file (multiple records) through a filter, remove these extraneous <cr> characters, and create a new, cleaned up version of the file for transmission.
As always, thanks in advance.
Tom
"My mind is like a steel whatchamacallit ...
Code:
<BR>^M
where the ^M is how the <cr> appears in the vi editor.
Also, if the <cr> isn't immediately after the <BR> character, it's valid (so they tell me )
Since I'm nowhere near to being a regex expert, can someone get me started on filtering these out of the file? As it stands, the file causes serious indigestion when it is imported into the receiving application. The idea is to pass the file (multiple records) through a filter, remove these extraneous <cr> characters, and create a new, cleaned up version of the file for transmission.
As always, thanks in advance.
Tom
"My mind is like a steel whatchamacallit ...