Sublime Text 正则表达式从选择中删除换行符?

Sublime Text regex to remove line breaks from a selection?

我无法弄清楚 Sublime Text 正则表达式如何从选择中删除换行符。

上下文是我正在格式化教科书试题库以通过 online Blackboard quiz generator 生成黑板测验池。这是一个示例问题。

25.   An increase in which of the following will increase the current value of a stock according to the dividend growth model?
I. dividend amount
II. number of future dividends, provided the current number is less than infinite
III. discount rate
IV. dividend growth rate 
A.    I and II only
B.    III and IV only
C.    I, II, and III only
*D.    I, II, and IV only
E.    I, II, III, and IV

我想删除罗马数字部分中的换行符,以便问题在一行中,每个答案(即 A 到 E)在单独的一行中。这是所需的输出。

25.   An increase in which of the following will increase the current value of a stock according to the dividend growth model? I. dividend amount II. number of future dividends, provided the current number is less than infinite III. discount rate IV. dividend growth rate 
A.    I and II only
B.    III and IV only
C.    I, II, and III only
*D.    I, II, and IV only
E.    I, II, III, and IV

这在 CTRL-J 的案例基础上很容易,但我想要一个可扩展的解决方案,因为其中一些文件非常大。我也在使用 RegReplace 来节省时间。

有没有办法用 Sublime Text 正则表达式做到这一点?我可以找到带有 /^[0-9]{1,3}\..*?IV/s 的块(我在 RegReplace 中使用 dotall 选项在 .* 中包含换行符),但我不知道如何删除换行符.

我假设你没有得到大于 99 的罗马数字:

\n(?=[IVXL])

您匹配了新行,后跟 IVXL 之一(但不匹配实际数字)。替换为 space.