当前位置:网站首页>Find a line in a file and remove it
Find a line in a file and remove it
2022-07-03 19:38:00 【Technology feast】
problem :
I'm looking for a small code snippet that will find a line in file and remove that line (not content but line) but could not find. I am looking for a small code fragment , It will find a line in the file and delete it ( Not content but line ) But I can't find .So for example I have in a file following: therefore , For example, in the following file :
myFile.txt : My papers .txt :
aaabbbcccdddNeed to have a function like this: public void removeLine(String lineContent) , and if I pass removeLine("bbb") , I get file like this: You need such a function : public void removeLine(String lineContent) , If I pass removeLine("bbb") , I will get such documents :
myFile.txt: My papers .txt:
aaacccdddSolution :
Reference resources : https://stackoom.com/en/question/5mIB边栏推荐
- Compared with 4G, what are the advantages of 5g to meet the technical requirements of industry 4.0
- BOC protected alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC / alanine zinc porphyrin Zn · TAPP ala BOC supplied by Qiyu
- Flume learning notes
- QT -- qfileinfo file information reading
- Strict data sheet of new features of SQLite 3.37.0
- Next spread
- 2022-06-27 网工进阶(十二)IS-IS-开销类型、开销计算、LSP的处理机制、路由撤销、路由渗透
- Zhang Fei hardware 90 day learning notes - personal record on day 5. Please see my personal profile / homepage for the complete record
- EGO Planner代碼解析bspline_optimizer部分(1)
- Free year-end report summary template Welfare Collection
猜你喜欢

第一章:三位阶乘和数,图形点扫描

Think of new ways

5- (4-nitrophenyl) - 10,15,20-triphenylporphyrin ntpph2/ntppzn/ntppmn/ntppfe/ntppni/ntppcu/ntppcd/ntppco and other metal complexes

QT -- qfileinfo file information reading

Merge K ascending linked lists

Common text labels

Free year-end report summary template Welfare Collection

Day18 - basis of interface testing

Yolov3 network model building

第一章:求n的阶乘n!
随机推荐
2022 - 06 - 30 networker Advanced (XIV) Routing Policy Matching Tool [ACL, IP prefix list] and policy tool [Filter Policy]
2022-06-30 advanced network engineering (XIV) routing strategy - matching tools [ACL, IP prefix list], policy tools [filter policy]
第一章: 舍罕王失算
Utilisation de base du cadre unitest
The necessity of lean production and management in sheet metal industry
Day10 -- forced login, token refresh and JWT disable
2022-07-02 advanced network engineering (XV) routing policy - route policy feature, policy based routing, MQC (modular QoS command line)
What is the content of game modeling
2022 Xinjiang latest road transportation safety officer simulation examination questions and answers
Basic principle of LSM tree
第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n
Summary of learning materials and notes of Zhang Fei's actual combat electronics 1-31
During MySQL installation, the download interface is empty, and the components to be downloaded are not displayed. MySQL installer 8.0.28.0 download interface is empty solution
Part 27 supplement (27) buttons of QML basic elements
2022-06-27 advanced network engineering (XII) IS-IS overhead type, overhead calculation, LSP processing mechanism, route revocation, route penetration
Day18 - basis of interface testing
第一章:求所有阶乘和数,大奖赛现场统分程序设计,三位阶乘和数,图形点扫描,递归求n的阶乘n!,求n的阶乘n!,舍罕王失算
SQL injection for Web Security (1)
Day11 ---- 我的页面, 用户信息获取修改与频道接口
[free sharing] kotalog diary2022 plan electronic manual ledger