当前位置:网站首页>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边栏推荐
- Basic principle of LSM tree
- I study database at station B (4): DQL
- IPv6 experiment
- Foundation of ActiveMQ
- CMD implements the language conversion of locale non Unicode programs
- Native table - scroll - merge function
- Chapter 1: King Shehan miscalculated
- 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
- BOC protected tryptophan porphyrin compound (TAPP Trp BOC) Pink Solid 162.8mg supply - Qiyue supply
- 第一章: 舍罕王失算
猜你喜欢

第一章:喝汽水,阶梯电费计算,阶梯电费计算函数,个人所税,求解平方根不等式,简化求解平方根不等式,求解调和级数不等式,解不等式:d<1+1/2-1/3+1/4+1/5-1/6+..士1/n

QT -- qfileinfo file information reading

第二章:求长方体数组,指定区间内的完全数,改进指定区间内的完全数

03 -- QT OpenGL EBO draw triangle

2020 intermediate financial management (escort class)

第二十章:y= sin(x)/x,漫步坐标系计算,y= sin(x)/x 带廓幅图形,奥运五环,小球滚动与弹跳,流水显示,矩形优化裁剪,r个皇后全控nxn棋盘

Native table - scroll - merge function
![Free hand account sharing in September - [cream Nebula]](/img/4f/fec31778a56886585e35be87885452.jpg)
Free hand account sharing in September - [cream Nebula]

Recommend a GIF processing artifact less than 300K - gifsicle (free download)

Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
随机推荐
Chapitre 1: le roi de shehan a mal calculé
The way to treat feelings
Chapter 2: find the box array, complete number in the specified interval, and improve the complete number in the specified interval
Webrtc[41] - Analysis of the establishment process of webrtc transmission channel
2022-06-30 網工進階(十四)路由策略-匹配工具【ACL、IP-Prefix List】、策略工具【Filter-Policy】
Chapter 1: King Shehan miscalculated
How does if ($variable) work? [repeat] - how exactly does if ($variable) work? [duplicate]
EGO Planner代碼解析bspline_optimizer部分(1)
Pecan — Overview
01. Preparation for automated office (free guidance, only three steps)
第一章:三位阶乘和数,图形点扫描
PR 2021 quick start tutorial, how to create new projects and basic settings of preferences?
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
Foundation of ActiveMQ
Thesis study - 7 Very Deep Convolutional Networks for Large-Scale Image Recognition (3/3)
[optics] vortex generation based on MATLAB [including Matlab source code 1927]
Bright purple crystal meso tetra (4-aminophenyl) porphyrin tapp/tapppt/tappco/tappcd/tappzn/tapppd/tappcu/tappni/tappfe/tappmn metal complex - supplied by Qiyue
Summary of composition materials for 2020 high-frequency examination center of educational resources
2022-07-02 网工进阶(十五)路由策略-Route-Policy特性、策略路由(Policy-Based Routing)、MQC(模块化QoS命令行)
BOC protected alanine porphyrin compound TAPP ala BOC BOC BOC protected phenylalanine porphyrin compound TAPP Phe BOC Qi Yue supply