I have some files with various line terminations of typically \x0d\x0a\x0d (CR,LF,CR) which need changing to \x0d\x0a (CR,LF). I have tried several things but only have success if I replace the original string to say "EOB" then run AFR again to replace "EOB" to the required \x0d\x0a string.
I also need to add one new character to the top of the file and one to the end.
Can anyone help please?
End of Line string
Hi,
First of all:
\x0d\x0a\x0d (CR,LF,CR) will be in regular expressions:
\r\n\r
So if you have different combinations, we advise you to use one line
in Batch grid for each pair of variants.
Secondly here is a solution that works for inserting chars at the top
and at the bottom of files:
Search for:
\A(.*)\Z
Replace with:
toptext$1bottomtext
So $1 will represent whole old content of the file.
toptext and bottomtext - are your texts you want to insert.
Very important to put correct modifiers:
Modifier S = ON
Modifier M = ON
Modifier I = ON
Modifier G = ON
We verifies these examples they perfectly work.
First of all:
\x0d\x0a\x0d (CR,LF,CR) will be in regular expressions:
\r\n\r
So if you have different combinations, we advise you to use one line
in Batch grid for each pair of variants.
Secondly here is a solution that works for inserting chars at the top
and at the bottom of files:
Search for:
\A(.*)\Z
Replace with:
toptext$1bottomtext
So $1 will represent whole old content of the file.
toptext and bottomtext - are your texts you want to insert.
Very important to put correct modifiers:
Modifier S = ON
Modifier M = ON
Modifier I = ON
Modifier G = ON
We verifies these examples they perfectly work.