Replace newlines with commas

1,058 views
Skip to first unread message

Nedo Papanti

unread,
Oct 5, 2016, 6:19:46 AM10/5/16
to scite-interest

Hello,

there's one thing which I think I was able to do with previous SciTE versions which apparently I am not able to do anymore with SciTE 3.6.7 on my Windows 7 machine.

 

That is, start from two lines

line_one

line_two

and obtain a single, comma-separated line

line_one,line_two

 

I tried in the way I think I was successful with previous SciTE versions but it didn't work with 3.6.7: go to "Search, Replace", click on the "Regular expression" button and then input (double quotes excluded) "\n" in the "Find" field and "," in the "Replace" field.

I also tried lots of combinations of options of "Search, Replace" as well as using "\r", "\r\n" etc.

 

Can you help?

 

Thx

 

np

Neil Hodgson

unread,
Oct 5, 2016, 4:12:19 PM10/5/16
to scite-i...@googlegroups.com
Nedo Papanti:

> I tried in the way I think I was successful with previous SciTE versions but it didn't work with 3.6.7: go to "Search, Replace", click on the "Regular expression" button and then input (double quotes excluded) "\n" in the "Find" field and "," in the "Replace" field.

The regex code in SciTE can not match expressions that include new lines. So turn “Regular expression” off and “Transform backslash expressions" on.

Neil

Nedo Papanti

unread,
Oct 6, 2016, 9:22:56 AM10/6/16
to scite-interest, nyama...@me.com
All clear, thank you.
Reply all
Reply to author
Forward
0 new messages