You are here: PSPad forum > English discussion forum > User Convertor remplace to CR
Posted by: Lahouz | Date: 2024-04-05 11:42 | IP: IP Logged
Hello,
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
[Settings]
;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
;DelimiterChars=|
;ignore char case - it tells convertor to ignore char case in specific direction
ForwardIgnoreCase=0
BackWardIgnoreCase=0
;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!
ConversionStyle=regexpressions
;expression from|expression to
[Strings]
;list of unicode values of chars to remove before conversion
[Remove chars]
;conversion table in unicode char values.
[Chars]
;regular expression|substitutions. Delimiter is the last pipe |
[RegExpressions]
(EOL)|\n
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
Thanks
Edited 1 time(s). Last edit at 2024-04-05 11:43 by Lahouz.
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