嗨,我需要删除特定的文本。文本 [英] Hi I need to remove text between specific. Text

查看:104
本文介绍了嗨,我需要删除特定的文本。文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我有txt文件我需要删除不使用undex或行号的特定文本之间的行。





例子





如何





iam

罚款







现在我想删除c#中are到fine之间的行。



我尝试过:



Hi,

I have txt file i need to remove rows between specific text not using undex or line no.


example

hi
how
are
you
iam
fine
about


Now i want delete lines between "are" to "fine" in c#.

What I have tried:

Hi i need to remove text between specific. text

推荐答案

引用:

你好我没有尝试了新的c#。

Hi i havent tried iam new to c#.



然后你需要检查你的课程资料,并开始计划你需要做什么。您已经在这里工作了十年,所以您现有的开发技能应该可以直接转移:定义问题,然后开始将其分解为更小的任务。如果你可以做一个小任务,那就好了。如果不是,请将其分解为更小的任务,然后再试一次。在某些时候,你要么得到你知道该怎么做的任务,要么得到你需要研究和发现的东西。

这与你可能使用了十年的过程完全相同或者更多,只是用不同的语言!



首先决定如何读取数据 - 一次或一行一行 - 以及如何输出,然后你可以开始考虑如何识别线条,并删除它们,因为这将取决于输入和输出选择。



你可以这样做,如果你只是想想先小心。


Then you need to review your course materials, and start planning what you need to do. You've been here for ten years, so your existing dev skills should be directly transferable: define the problem, then start breaking it down into smaller tasks. If a smaller task is something you can do, fine - do it. If it isn't, break it down into yet smaller tasks and try again. At some point, you either get tasks you know how to do, or you get to something you need to research and find out about.
It's exactly the same process you have probably been using for ten years or more, just in a different language!

So start by deciding how to read the data - all at once or line by line - and how to output it, then you can start thinking about how to identify lines, and "remove" them as that will depend on the input and output choices.

You can do this, if you just think carefully first.


这篇关于嗨,我需要删除特定的文本。文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆