Quantcast
Channel: UltraEdit, UltraCompare, UEStudio forums
Viewing all articles
Browse latest Browse all 307

Find/Replace/Regular Expressions • Find empty line and replace with a set of characters

$
0
0
Greetings, 

I've got a batch of exams that are in a column format. I need to add a special character after each question/answer that will allow me to macro a combine function. Here's an example: I have added /cr as the carriage return. I need to find/replace that empty line /cr (line 5 in the example, it is different in every question). So I need to find the empty line, add/replace some text that I can use to group the items and combine the text. Lets say I would like to use QQQ.

Code:

1. This is a question /crthat will answer all your /crquestions about this /crsubject/cr/cr1.  Answer A./cr
After replace I'd like to see this:

Code:

1. This is a question /crthat will answer all your /crquestions about this /crsubject/crQQQ/cr
Then I can macro a remove word wrap  on everything up to the QQQ. Let me know how to proceed. I've tried searching for the empty line in Perl using  ^(?:[\t ]*(?:\r?\n|\r))+ but it wipes out the carriage return.

Thanks in advance,
Koni

statistics: Posted by konichiwa0:40 - Today — Replies 1 — Views 24



Viewing all articles
Browse latest Browse all 307

Trending Articles