You are here: PSPad forum > English discussion forum > User Convertor remplace to CR

User Convertor remplace to CR

#1 User Convertor remplace to CR

Posted by: Lahouz | Date: 2024-04-05 11:42 | IP: IP Logged

I want to use RegExpessions on User Convertor to replace several expressions. One of this is to replace the string 'EOL' by a carriage return.

I put this script in the INI file.

;User conversion definition file for PSPad editor

;name for Left to Right conversion. If you don't fill name or delete it,
;it won't allow conversion. E.g. if you want to offer one direction conversion only
;For regular expressions style forward direction is allowed only
ForwardName=Test CR
;BackwardName=This name will describe conversion from right to left
;Optional Delimiter char for strings and regular expressions. Default is pipe

;ignore char case - it tells convertor to ignore char case in specific direction

;ConversionStyle=strings - convertor will use string replacement from [Strings] section
;ConversionStyle=chars - convertor will use conversion table from [Chars] section
;ConversionStyle=regexpressions - convertor will use regular expression [RegExpressions] section - not yet implemented
; regular expression style is one directional only!

;expression from|expression to

;list of unicode values of chars to remove before conversion
[Remove chars]

;conversion table in unicode char values.

;regular expression|substitutions. Delimiter is the last pipe |

When I run it, 'EOL' is replaced by the string '\n' and not by a CR.
I also tried with \r\n or \\n , same result

Do you have an idea ?

On Search/replace, it works good with replace (EOL) by \n with Regexp checked

Edited 1 time(s). Last edit at 2024-04-05 11:43 by Lahouz.

Options: Reply | Quote | Up ^

Editor PSPad - freeware editor, © 2001 - 2024 Jan Fiala, Hosted by Webhosting TOJEONO.CZ, design by WebDesign PAY & SOFT, code Petr Dvořák, Privacy policy and GDPR