我在网页上显示长的文本,我使用段落标签来分隔我的句子。然而,当我的第一组文本显示一半的句子显示在下一行时。
<p>This is some random text that I am typing on the screen for an example. </p>
<p>My second line for this example </p>
以下是屏幕上显示的内容:
This is some random text that I am
typing on the screen for
an example.
My second line fo
我是一个regex新手,所以这是很多尝试和错误,但出于某些原因,我只能让它有时工作,我不知道为什么。让我来布置一下我在做的事情。我有一个像这样的文本文件:
1.Some Text Here
A paragraph of words here.
2.Some More Text Here
A paragraph of words here.
我使用这段代码查找开头有数字的行:
^[0-9]+.([^.]*)$
然后我把它替换为:
<h2>$1</h2>\r\r
我遇到的问题是,它通常会抓住以数字开头的行,但出于某种原因,它会抓住带有数字和下面段落的线。所以,它不
我有以下段落(保存在文件text.txt上):
Good morning, my name is Maria.
I study in the university.
I like to travel.
最后,我想用三个段落来结尾,和那个段落完全一样,但有不同的女性名字。期望产出:
Good morning, my name is Maria.
I study in the university.
I like to travel.
Good morning, my name is Lola.
I study in the university.
I like to travel.
G
我试图使用sed删除与特定模式和后续所有行匹配的行,直到找到另一个模式。
例如:
This is a line I want to delete,
this is second line that should be deleted.
And this is stop-pattern which should terminate deletion.
我想删除给sed两种模式/delete,/ (这是应该删除的起始模式和包含该模式的整行)和/(这是决定停止删除的点的模式)的整个段落。
如何编写能够完成这一任务的sed命令?